Class Validators.LengthValidator

    • Constructor Detail

      • LengthValidator

        public LengthValidator​(Length length)
    • Method Detail

      • validate

        public void validate​(String value,
                             String field,
                             Context context)
        Validate the given value
        Specified by:
        validate in interface Validator<String>
        Parameters:
        value - The value, may be null
        field - The name of the field being validated, if applicable
        context - The Ninja request context
      • getValidatedType

        public Class<String> getValidatedType()
        Description copied from interface: Validator
        Get the type that this validator validates
        Specified by:
        getValidatedType in interface Validator<String>
        Returns:
        The type that the validator validates