TextArea / Validation

Blazor TextArea - Validation

Loading Syncfusion Blazor Server Demos…

This example demonstrates form validation using Data Annotation attributes. Type the value in the textarea. If the input value is valid, the input will be ready to submit. Otherwise, an error message will be displayed until you enter a valid value.

The form enables validation with data annotation attributes when the submit button is clicked externally. All validation rules are enforced by the DataAnnotationsValidator component.

Name and Comments Fields Validation Rules:

Field Rule
Required The field must have a valid value.
MinLength The name field must have more than 3 characters, and the comments field must have more than 10 characters in length.
MaxLength The name field should not have more than 10 characters, and the comments field should not have more than 20 characters in length.

Address Field Validation Rule:

Field Rule
Required The fields must have a valid value.
Transform your Blazor web apps today with Syncfusion® Blazor components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE