Interface FieldValidator<E extends EntityType<E>,​T>

  • Type Parameters:
    E - entity type
    T - type of the validated field
    All Superinterfaces:
    ChangeValidator
    All Known Implementing Classes:
    NullFieldValidatorImpl

    public interface FieldValidator<E extends EntityType<E>,​T>
    extends ChangeValidator
    The simplest form of a validator - validates a single field value without using any external information. For example, may be used to validate that the value of a field is positive.
    • Method Detail

      • validatedField

        EntityField<E,​T> validatedField()
        Returns:
        the field validated by the validator
      • validate

        ValidationError validate​(T fieldValue)
        Validates the value.
        Parameters:
        fieldValue - new value of the field
        Returns:
        validation error or null if none