Class ProjectionValidator<V,C>

Type Parameters:
V - type of the value to validate.
C - type of the child value to validate using the child validators.
All Implemented Interfaces:
Composable<Validator<?>>, Validator<V>, Iterable<Validator<?>>

public class ProjectionValidator<V,C> extends AbstractComposedValidator<V,C>
Validator that projects (maps) the performs the validation using other Validator(s) on the result.
Since:
1.0.0
  • Constructor Details

  • Method Details

    • validate

      public ValidationResult validate(V value, Object valueSource)
      Description copied from interface: Validator
      This method validates the given value.
      Parameters:
      value - is the value to validate.
      valueSource - is the source describing the origin of the given value. The source needs to have a reasonable string-representation as this may be displayed to the end-user to locate the source of the failure. In most cases it is suitable to directly pass a String.
      Returns:
      the ValidationResult.