KEMBAR78
Jquery validate - TuanNA | PPT
Jquery Validate
Name: Nguyen Anh Tuan
From: Framgia Company
Introduction
 This jQuery plugin makes simple clientside form
validation trivial
 The plugin comes bundled with a useful set of
validation methods
 including URL and email validation
 providing an API to write your own methods
Jquery Validate
 Current version: 1.11.1
 Require: jQuery, tested with 1.6.4, 1.7.2, 1.8.3, 1.9.0
 Document:
http://validation.bassistance.de/documentation/
Plugin methods
 validate() – Validates the selected form.
 valid() – Checks whether the selected form or
selected elements are valid.
 rules() – Read, add and remove rules for an element.
Validator
 Validator.form() – Validates the form.
 Validator.element() – Validates a single element.
 Validator.resetForm() – Resets the controlled form.
 Validator.showErrors() – Show the specified
messages.
 Validator.numberOfInvalids() – Returns the number
of invalid fields.
List of built-in Validation methods
 required – Makes the element required.
 minlength – Makes the element require a given
minimum length.
 maxlength – Makes the element require a given
maxmimum length.
 email – Makes the element require a valid email
 url – Makes the element require a valid url
 date – Makes the element require a date.
 digits – Makes the element require digits only.
 creditcard – Makes the element require a creditcard
number.
Reference
http://jqueryvalidation.org/
http://jquery.bassistance.de/validate/demo/

Jquery validate - TuanNA

  • 1.
    Jquery Validate Name: NguyenAnh Tuan From: Framgia Company
  • 2.
    Introduction  This jQueryplugin makes simple clientside form validation trivial  The plugin comes bundled with a useful set of validation methods  including URL and email validation  providing an API to write your own methods
  • 3.
    Jquery Validate  Currentversion: 1.11.1  Require: jQuery, tested with 1.6.4, 1.7.2, 1.8.3, 1.9.0  Document: http://validation.bassistance.de/documentation/
  • 4.
    Plugin methods  validate()– Validates the selected form.  valid() – Checks whether the selected form or selected elements are valid.  rules() – Read, add and remove rules for an element.
  • 5.
    Validator  Validator.form() –Validates the form.  Validator.element() – Validates a single element.  Validator.resetForm() – Resets the controlled form.  Validator.showErrors() – Show the specified messages.  Validator.numberOfInvalids() – Returns the number of invalid fields.
  • 6.
    List of built-inValidation methods  required – Makes the element required.  minlength – Makes the element require a given minimum length.  maxlength – Makes the element require a given maxmimum length.  email – Makes the element require a valid email  url – Makes the element require a valid url  date – Makes the element require a date.  digits – Makes the element require digits only.  creditcard – Makes the element require a creditcard number.
  • 7.