Super light-weight jQuery form validation
Switch branches/tags
Nothing to show
Pull request Compare This branch is 8 commits behind davist11:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
scripts
stylesheets
README.markdown
index.htm
thanks.htm

README.markdown

This is a light-weight form validation plugin. All it does is check if a field is empty, or if an email field is a properly formatted email address.

To mark a field as valid, just add a class of required to the field. To make sure the email is a valid email address, also add a class of email to the field. Then, just call the plugin on the form.

Defaults:

$('form.required-form').simpleValidate({  
  errorClass: 'error', //Class for the error message text  
  errorText: '{label} is a required field.', //Structure for the error message text, {label} will be replaced with the associated label text  
  emailErrorText: 'Please enter a valid {label}', //Structure for the email error message text, {label} will be replaced with the associated label text  
  errorElement: 'strong', //Element to use for the error message text  
  removeLabelChar: '*', //If there is an extra character in the label to denote a required field, strip it out  
  inputErrorClass: '', //Class to add to an input when it is marked as having an error  
  completeCallback: '', //Function to call once the form is error-free  
  ajaxRequest: false //If you don't want to use the default form action and want to submit it via AJAX  
});