package com.codename1.ui.validation
The validation framework allows us to mark invalid input in text components and disable components
in the case of invalid input
Types
interface Constraint | To perform validation we add a constraint to a validator, a constraint defines whether a value if valid for a given object |
class ExistInConstraint | Creates a validation constraint to ensure input value exists in a list of items |
class GroupConstraint | Groups several constraints as if they are one constraint |
class LengthConstraint | Creates a validation constraint based on minimum input length |
class NotConstraint | Negates a group of constraints, such that, if any of its child constraints is true, it returns false. |
class NumericConstraint | Forces the value to be a number potentially within specific bounds |
class RegexConstraint | Creates a validation constraint based on a regular expression |
class Validator | Binds validation constraints to form elements, when validation fails it can be highlighted directly on the component via an emblem or change of the UIID (to original UIID name + “Invalid” e.g. “TextFieldInvalid”). |