Interface IValidationRule

All Known Implementing Classes:
AndRule, AtLeastOneExistsRule, ExcludedRule, IncludedRule, NotRule, OnlyOneExistsRule, OrRule, PropertiesComparisonRule, ValueComparisonRule

public interface IValidationRule
Interface for validation rules.

Validation rule can validate one or multiple values against complex rules like: value is in range, one property is less than another property, enforce enumerated values and more.

This interface allows to implement custom rules.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(String path, Schema schema, Object value, List<ValidationResult> results)
    Validates a given value against this rule.
  • Method Details

    • validate

      void validate(String path, Schema schema, Object value, List<ValidationResult> results)
      Validates a given value against this rule.
      Parameters:
      path - a dot notation path to the value.
      schema - a schema this rule is called from
      value - a value to be validated.
      results - a list with validation results to add new results.