CompareValidator (Angular)
This guide demonstrates how to use the CompareValidator component.
The CompareValidator will show its Text property unless the value of its Component is equal to a specified value or the value of another component.
CompareValidator Properties
Name | Type | Default | Description |
---|---|---|---|
Name | string | ‘compareValidator’ + index suffix | Unique name of CompareValidator. |
Text | string | ‘Value should match’ | The text that the validator will display. |
Component | string | null | The Name of a input component. |
ComponentToCompare | string | null | The Name of a input component to compare with. |
Visible | boolean/expression | true | Is the CompareValidator visible. |
Usage
The CompareValidator is used to verify that value of an input component (e.g. TextBox, DropDown) matches some other value - either a predefined one or the value of another component.
- Drag and drop a CompareValidator from the Radzen toolbox.
- Set its Component property via the dropdown.
- Either set the Value property or the ComponentToCompare property.