Skip to content

Instantly share code, notes, and snippets.

@victorjonsson
Created July 21, 2012 07:22
Show Gist options
  • Save victorjonsson/3154955 to your computer and use it in GitHub Desktop.
Save victorjonsson/3154955 to your computer and use it in GitHub Desktop.
jQuery Form Validator, example
<form action="" onsubmit="return $(this).validate()">
<p>
Name (4 characters minimum):
<input name="user" data-validation="validate_min_length length4" />
</p>
<p>
Birthdate (yyyy-mm-dd):
<input name="birth" data-validation="validate_birthdate" />
</p>
<p>
Website:
<input name="website" data-validation="validate_url" />
</p>
<p>
<input type="submit" />
</p>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment