Class RequiredFieldValidator

    • Constructor Detail

      • RequiredFieldValidator

        public RequiredFieldValidator()
    • Method Detail

      • validate

        public void validate​(Field field)
                      throws ValidationException
        If the value of the field is not null and not empty, this method returns silently. Otherwise, it throws a ValidationException with an error message saying that the named field is required.
        Specified by:
        validate in interface FieldValidator
        Parameters:
        field - the Field to validate.
        Throws:
        ValidationException - if the field value is null or empty (white space only).