Form Validation Toolkit

Data Type Tests



Minimum Steps to Validation:

1. Set the validation attributes of the input field
2. Attach (Initiate) the JavaScript validation process to the form (or the fields)

URL or Web Address

data-val-checkType="url" can be specified as an attribute to check for a valid URL as an input. No data formats are available for this type.

Example:
<input type="text" data-val-error-text="Please supply a valid URL." data-val-error-title="URL Address" 
	data-val-required="1" id="url" name="url" data-val-checkType="url"  />

<script>
	$('#data-type-test-form').initValidation();
</script>