Class ValidHostValidator

    • Constructor Detail

      • ValidHostValidator

        public ValidHostValidator()
    • Method Detail

      • initialize

        public void initialize​(ValidHost annotation)
        Description copied from interface: ConstraintValidator
        Called before this validator is used with the constraint annotation value.
        Specified by:
        initialize in interface ConstraintValidator<ValidHost>
        Parameters:
        annotation - the annotation value this validator will be validating.
      • isValid

        public boolean isValid​(String name,
                               Object value)
        Description copied from interface: ConstraintValidator
        Indicates if the given value is valid.
        Specified by:
        isValid in interface ConstraintValidator<ValidHost>
        Parameters:
        name - the name to use for error reporting
        value - the value to validate.
        Returns:
        true if the given value is valid.