Form Validation Toolkit

Validation Types

How many different ways or types of validation can we carry out.

Min-Length Validation

Whether a field is required or not, additional checks for validation can be specified. Minimum length is one of these types of validation checks.

<label class="text" for="name"/>
	<span>Name</span>
	<input type="text" name="name" id="name" maxlength="20"  data-val-min-length="5"  
	data-val-error-title="Name" data-val-error-text="Name is required. Minimum length is 5 characters." />
</label>
Example:
Minimum length requirement will be checked only if the field has some value.