Save $100 with promo code CHEERS2025

As we are looking forward to an incredible 2025, enjoy our end-of-year promotion! Valid now through January 6th.

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.