addon filters for jQuery.validate
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
jquery.validate.filters.js
jquery.validate.filters.uk.js
jquery.validate.max.js
readme.markdown

readme.markdown

add-on filters for jquery.validate

validate.accept:

regex form filter

options

Only numbers:

rules: {
  field: { accept: "[0-9]+" }
}


Only letters:

rules: {
  field: { accept: "[a-zA-Z]+" }
}

others

  • phoneUK - validate UK phone number
  • mobileUK - validate UK mobile phone number
  • lettersOnly - validate only letter input
  • numbersOnly - validate only numeric input
  • postalCode - validate standard postal code format
  • imgUrl - validate image url

notes

look at jQuery.alphanumeric to prevent number / letter / pattern input -> here