Example of Reactive FormValidator in Angular Form Validator Component

This sample demonstrates an Angular Reactive FormValidator. Type a values or characters in the input element. If the input values are correct format then the given input will be ready to submit otherwise error message will be shown until entering the input as correct format.

Add Customer Details
Description
Description

Form Validator can be used to validate the form input elements with the required validation rules.


The above form is configured with the following rules and also, we have given the examples of valid values for each field.

Validation FunctionsRuleExample
requiredThe field must have any value.value
emailThe input must have email format.info@syncfusion.com
urlThe input must have URL format.https://www.syncfusion.com/
dateThe input must have JavaScript date format.04/13/2017
dateIsoThe input must have date ISO format.2017-04-13
numberThe input must have number format. It allows float values.1 or 1.4
digitsThe input must have digit format.1
maxLengthThe input value must have less than 5 characters length.world
minLengthThe input value must have more than 5 characters length.syncfusion
rangeLengthThe input must have number value from 5 to 10 characters length.syncfusion
maxThe input must have number value less than or equal to 5.4
minThe input must have number value greater than or equal to 5.6

You can enter the above values in the corresponding input elements and click the submit button to validate the form. The reset button can wipe out all the input values in the form.