Skip to content

A jQuery validation plugin for browsers that don't support HTML5 validation

Notifications You must be signed in to change notification settings

steven/Html5Validation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NoHtml5Validation

A jQuery validation plugin for browsers that do not have HTML5 the validation feature. The plugin mimics Mozilla Firefox's HTML5 validation look and feel.

Updates in Html5Validation v0.2


  • CSS styling is performed within the plugin so no additional styles are needed
  • Standard HTML5 input attributes (pattern) detected

To-do's


  • IE7 z-index bug
  • Input box highlighting for invalid fields
  • Additional support for new HTML5 input types

Implementation


including options and their defaults

HTML form example

<form action="#" id="testEmail">
	<label for="checkbox">Email</label>
	<input type="email" required>
	<button type="submit">Try me</button>
</form>
		
<form action="#" id="testPattern">
	<label>Numbers only please</label>
	<input type="text" required pattern="[0-9]{3}">
	<button type="submit">Try me</button>
</form>
	
<form action="#" id="testSelect">
	<label>Choose an option</label>
	<select required>
		<option value="">Option 1 is empty</option>
		<option>Option 2 is NOT empty</option>
		<option>Option 3 is NOT empty</option>
		<option>Option 3 is NOT empty</option>
	</select><br>
	<label for="checkbox">Check me please</label>
	<input type="checkbox" required>
	<button type="submit">Try me</button>
</form>

Script

$('form#testEmail').NoHtml5Validation({
	elementTypes: 'input',
});

$('form#testPattern').NoHtml5Validation({
	elementTypes: 'input',
});

$('form#testSelect').NoHtml5Validation({
	elementTypes: 'select, input',
});

$('form#testSelect').NoHtml5Validation({
	elementTypes: 'select',
});

About

A jQuery validation plugin for browsers that don't support HTML5 validation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published