IValidationRule

Interface used to implement custom validation rules.

Description

The IValidationRule interface allows you to implement custom validation rules.

Instance methods

validate

Validates a given value against this rule.

public validate(path: string, schema: Schema, value: any, results: ValidationResult[]): void

  • path: string - dot notation path to the value.
  • schema: Schema - schema this rule is called from
  • value: any - value to be validated.
  • results: ValidationResult[] - list with validation results.