public enum ValidationPhase extends Enum<ValidationPhase>
An enumeration class that describes the different validation phases.
An instance of this class is passed to theFieldHandler.validate(ValidationPhase)
method. This
method can then determine, which validation to perform.
The form framework distinguishes between validation on the field and the form layer. The field layer deals with syntactic checks. Here the user input is verified to match the expected data type, e.g. is the text entered by the user a valid number or a valid date? The form layer is more about semantic. After the user's input has been transformed into the target data types constraints for the single fields are checked, e.g. is the number between 0 and 100 or is the date in the future.
Enum Constant and Description |
---|
LOGIC
The validation phase "form".
|
SYNTAX
The validation phase "field".
|
Modifier and Type | Method and Description |
---|---|
static ValidationPhase |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValidationPhase[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValidationPhase SYNTAX
public static final ValidationPhase LOGIC
public static ValidationPhase[] values()
for (ValidationPhase c : ValidationPhase.values()) System.out.println(c);
public static ValidationPhase valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2016 The JGUIraffe Team. All rights reserved.