Save $100 with our Black Friday deals!

Get $100 OFF with promo code BLACKFRIDAY2024 at checkout until November 30.

See Pricing

Still using Radzen Studio?
Achieve more with Radzen Blazor Studio

Radzen Blazor Studio is our new flagship product and vision of how rapid Blazor application development should be done.

Go to Radzen Blazor Studio

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.

  1. Drag and drop a CompareValidator from the Radzen toolbox.
  2. Set its Component property via the dropdown.
  3. Either set the Value property or the ComponentToCompare property.