Class BasePropertyValidation

    • Method Detail

      • validate

        public final ValidationError validate​(Object object,
                                              Object property,
                                              Object value)
        Description copied from interface: PropertyValidation
        Validates a property value
        Specified by:
        validate in interface PropertyValidation
        Parameters:
        object - The object
        property - The property name or descriptor
        value - The property value
        Returns:
        An error if there is an error, or null when is valid
      • handleEmpty

        protected boolean handleEmpty()
        May be overridden in order to indicate that empty values should be validated
      • isValid

        protected abstract boolean isValid​(Object object,
                                           Object property,
                                           Object value)
        Should be implemented to return whether the value is valid. If the value is valid, the validate(Object, Object, Object) method will return null. Otherwise, will return the ValidationError received on the constructor (or a general validation error if none was passed)