Annotation Type ExistIn
Requires the component value to be one of an allowed list of strings. The
processor emits
com.codename1.ui.validation.ExistInConstraint(value, caseSensitive, message)
into the Validator returned by Binding#getValidator().
@Bind(name="roleField") @ExistIn({"admin", "editor", "viewer"})
private String role;
Use it to gate free-text fields that should accept only a known
vocabulary, or to gate Picker selections against an authoritative list
known at compile time.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleantrueto compare values with case-sensitivity.Override the default error message (ExistInConstraintderives one from the value list when blank).
-
Element Details
-
value
String[] valueThe allowed values. The component must equal one of them. -
caseSensitive
boolean caseSensitivetrueto compare values with case-sensitivity. Default: false.- Default:
false
-
message
String messageOverride the default error message (ExistInConstraintderives one from the value list when blank).- Default:
""
-