ValidationRuleOptionsCollection

Description

A ValidationRuleOptionsCollection is an interface used to store all the options of a ValidationRule (when used as a ValidationRuleConfiguration), a ValidationRuleDefinition or a ValidationContext. Each validation rule option is under a specific key. It extends ResourceCollection<any>.

Property

Property

Element

Type

Description

key

 

string

The identifier of the validation rule option

 

value

any

The validation rule option.

Example

This validationRuleOptions defines three (3) validation rule options.

const validationRuleOptions = {

  min: 0,

  max: 15,

  errorMessage: "Value must be between 0 and 15."

};

This validationRuleOptions can be used as a ValidationRuleConfiguration.options. The ValidationRuleConfiguration can then be used as one of the ColumnDefinition.validationRules to validate a column with specific validation options.