package jwebform.element.structure;

import java.util.function.Function;

import jwebform.env.Env.EnvWithSubmitInfo;
import jwebform.validation.Validator;

@FunctionalInterface
public interface Element extends Function<EnvWithSubmitInfo, ElementResult> {

  default public ElementContainer of() {
    return new ElementContainer(this);
  }

  default public ElementContainer of(Validator validator) {
    return new ElementContainer(this, validator);
  }

}

@@ -149,16 +149,156 @@
 dator;%0A%0A
+// Every jWebForm Element must implement this interface. It is just the %22apply%22 fucntion of the%0A// %22Function%22 (java.util.function.Function)%0A
 @Functio

add comments