Class RegexValidator

  • All Implemented Interfaces:
    PartialStateHolder, StateHolder, Validator, EventListener

    @JSFValidator(name="f:validateRegex",
                  bodyContent="empty")
    @JSFJspProperty(name="binding",
                    returnType="jakarta.faces.validator.RegexValidator",
                    longDesc="A ValueExpression that evaluates to a RegexValidator.")
    public class RegexValidator
    extends Object
    implements Validator, PartialStateHolder

    RegexValidator is a Validator that checks the value of the corresponding component against specified pattern using Java regular expression syntax. The regular expression syntax accepted by the RegexValidator class is same as mentioned in class Pattern in package java.util.regex.

    The following algorithm is implemented:

    Since:
    2.0
    • Field Detail

      • VALIDATOR_ID

        public static final String VALIDATOR_ID
        Converter ID, as defined by the JSF 2.0 specification.
        See Also:
        Constant Field Values
      • PATTERN_NOT_SET_MESSAGE_ID

        public static final String PATTERN_NOT_SET_MESSAGE_ID
        This message ID is used when the pattern is null, or an empty String.
        See Also:
        Constant Field Values
      • NOT_MATCHED_MESSAGE_ID

        public static final String NOT_MATCHED_MESSAGE_ID
        This message ID is used when the passed value is not a String, or when the pattern does not match the passed value.
        See Also:
        Constant Field Values
      • MATCH_EXCEPTION_MESSAGE_ID

        public static final String MATCH_EXCEPTION_MESSAGE_ID
        This message ID is used when the pattern is not a valid regular expression, according to the rules as defined in class Pattern
        See Also:
        Constant Field Values
    • Constructor Detail

      • RegexValidator

        public RegexValidator()