Enum JakartaValidationOption
- java.lang.Object
-
- java.lang.Enum<JakartaValidationOption>
-
- com.github.victools.jsonschema.module.jakarta.validation.JakartaValidationOption
-
- All Implemented Interfaces:
Serializable
,Comparable<JakartaValidationOption>
public enum JakartaValidationOption extends Enum<JakartaValidationOption>
Flags to enable/disable certain aspects of theJakartaValidationModule
's processing.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INCLUDE_PATTERN_EXPRESSIONS
Use this option to include a string's "pattern" according to@Pattern(regexp = "...")
or@Email(regexp = "...")
.NOT_NULLABLE_FIELD_IS_REQUIRED
Use this option to add not-nullable fields to their parent's list of "required" properties.NOT_NULLABLE_METHOD_IS_REQUIRED
Use this option to add not-nullable methods to their parent's list of "required" properties.PREFER_IDN_EMAIL_FORMAT
Use this option to indicate the "idn-email" format instead of "email" when an@Email
annotation is being found.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JakartaValidationOption
valueOf(String name)
Returns the enum constant of this type with the specified name.static JakartaValidationOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOT_NULLABLE_FIELD_IS_REQUIRED
public static final JakartaValidationOption NOT_NULLABLE_FIELD_IS_REQUIRED
Use this option to add not-nullable fields to their parent's list of "required" properties.
-
NOT_NULLABLE_METHOD_IS_REQUIRED
public static final JakartaValidationOption NOT_NULLABLE_METHOD_IS_REQUIRED
Use this option to add not-nullable methods to their parent's list of "required" properties.
-
PREFER_IDN_EMAIL_FORMAT
public static final JakartaValidationOption PREFER_IDN_EMAIL_FORMAT
Use this option to indicate the "idn-email" format instead of "email" when an@Email
annotation is being found.
Beware that this format was only introduced inSchemaVersion.DRAFT_7
.
-
INCLUDE_PATTERN_EXPRESSIONS
public static final JakartaValidationOption INCLUDE_PATTERN_EXPRESSIONS
Use this option to include a string's "pattern" according to@Pattern(regexp = "...")
or@Email(regexp = "...")
.
-
-
Method Detail
-
values
public static JakartaValidationOption[] 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 (JakartaValidationOption c : JakartaValidationOption.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JakartaValidationOption 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
-
-