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

LengthValidator (Angular)

This guide demonstrates how to use the LengthValidator component.

The LengthValidator will show its Text property unless the value of its Component is within the specified character length.

LengthValidator Properties

Name Type Default Description
Name string ‘lengthValidtor’ + index suffix Unique name of LengthValidator.
Text string ‘Invalid length’ The text that the validator will display.
Min number/expression   The minimum target character length.
Max number/expression   The maximum target character length.
Component string null The Name of a input component.
Visible boolean/expression true Is the LengthValidator visible.

Usage

The LengthValidator is used to verify that value of an input component (e.g. TextBox) is within specified character length. You can specify Min, Max or both.

  1. Drag and drop a LengthValidator from the Radzen toolbox.
  2. Set its Component property via the dropdown.
  3. Set the Min and or Max property.