Package org.confng.validation
Enum ValidationError.ConstraintType
- java.lang.Object
-
- java.lang.Enum<ValidationError.ConstraintType>
-
- org.confng.validation.ValidationError.ConstraintType
-
- All Implemented Interfaces:
Serializable,Comparable<ValidationError.ConstraintType>
- Enclosing class:
- ValidationError
public static enum ValidationError.ConstraintType extends Enum<ValidationError.ConstraintType>
Types of validation constraints that can be violated.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ValidationError.ConstraintTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ValidationError.ConstraintType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REQUIRED
public static final ValidationError.ConstraintType REQUIRED
Value is required but missing
-
PATTERN
public static final ValidationError.ConstraintType PATTERN
Value does not match the expected pattern
-
RANGE
public static final ValidationError.ConstraintType RANGE
Value is outside the allowed range
-
NOT_EMPTY
public static final ValidationError.ConstraintType NOT_EMPTY
Value is empty when it should not be
-
TYPE
public static final ValidationError.ConstraintType TYPE
Value cannot be converted to the expected type
-
-
Method Detail
-
values
public static ValidationError.ConstraintType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ValidationError.ConstraintType c : ValidationError.ConstraintType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ValidationError.ConstraintType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-