Class StringLengthValidator

    • Constructor Detail

      • StringLengthValidator

        public StringLengthValidator​(int maxLength)
    • Method Detail

      • validate

        public void validate​(Field field)
                      throws ValidationException
        Description copied from interface: FieldValidator
        Implementations of this method can perform any necessary validation on the Field. If the field is deemed invalid, a ValidationException should be thrown with a descriptive error message.
        Specified by:
        validate in interface FieldValidator
        Parameters:
        field - the field (name and value) to validate.
        Throws:
        ValidationException - if the field is invalid.