{"id":33091164,"url":"https://github.com/victorjonsson/jQuery-Form-Validator","last_synced_at":"2025-11-16T14:00:41.315Z","repository":{"id":1179324,"uuid":"1077768","full_name":"victorjonsson/jQuery-Form-Validator","owner":"victorjonsson","description":"[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your  HTML markup clean from javascript code.","archived":false,"fork":false,"pushed_at":"2021-09-09T14:30:21.000Z","size":2222,"stargazers_count":966,"open_issues_count":235,"forks_count":469,"subscribers_count":56,"default_branch":"master","last_synced_at":"2025-11-11T05:22:03.918Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victorjonsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-13T17:28:29.000Z","updated_at":"2025-10-27T14:11:15.000Z","dependencies_parsed_at":"2022-08-03T00:00:10.805Z","dependency_job_id":null,"html_url":"https://github.com/victorjonsson/jQuery-Form-Validator","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/victorjonsson/jQuery-Form-Validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorjonsson%2FjQuery-Form-Validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorjonsson%2FjQuery-Form-Validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorjonsson%2FjQuery-Form-Validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorjonsson%2FjQuery-Form-Validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victorjonsson","download_url":"https://codeload.github.com/victorjonsson/jQuery-Form-Validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victorjonsson%2FjQuery-Form-Validator/sbom","scorecard":{"id":920484,"data":{"date":"2025-08-11","repo":{"name":"github.com/victorjonsson/jQuery-Form-Validator","commit":"cac6a2790498bf13d12f21618706dcfb7b010f76"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 5/18 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-25T01:50:00.575Z","repository_id":1179324,"created_at":"2025-08-25T01:50:00.575Z","updated_at":"2025-08-25T01:50:00.575Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284719042,"owners_count":27052182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-14T18:00:23.164Z","updated_at":"2025-11-16T14:00:41.301Z","avatar_url":"https://github.com/victorjonsson.png","language":"JavaScript","readme":"# jQuery Form Validator [DISCONTINUED]\n\n*Validation framework that let's you configure, rather than code, your validation logic.*\n\nI started writing this plugin back in 2009 and it has given me much joy over the years. But all good things must come to an end and now it's time for this plugin to pull in its oars and go down with history.\n\n**This plugin is no longer being developed!** It supports jQuery v. 1.8 \u003e= 2.2.4. No pull requests will become merged in but feel free to fork and do whatever you like!\n\n[![Travis](https://travis-ci.org/victorjonsson/jQuery-Form-Validator.svg)](https://travis-ci.org/victorjonsson/jQuery-Form-Validator/builds/)\n\n[![npm version](https://badge.fury.io/js/jquery-form-validator.svg)](https://www.npmjs.com/package/jquery-form-validator)\n\n*Usage example*\n\n```html\n\u003cform action=\"\" method=\"POST\"\u003e\n  \u003cp\u003e\n    Name (4 characters minimum):\n    \u003cinput name=\"user\" data-validation=\"length\" data-validation-length=\"min4\" /\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    Birthdate (yyyy-mm-dd):\n    \u003cinput name=\"birth\" data-validation=\"birthdate\" /\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    Website:\n    \u003cinput name=\"website\" data-validation=\"url\" /\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    \u003cinput type=\"submit\" /\u003e\n  \u003c/p\u003e\n\u003c/form\u003e\n\u003cscript src=\"js/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/form-validator/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    $.validate({\n        modules : 'date, security'\n    });\n\u003c/script\u003e\n```\n\n### Support for HTML5\n\nThis plugin can serve as a fallback solution for the validation attributes in the HTML5 spec. With the html5 module you can use the following native features:\n\n**Attributes**: require, pattern, maxlength, min, max, placeholder\n\n**Input types**: url, date, time, email, number\n\n**Elements**: Use the element `datalist` to create input suggestions\n\n\n### Default validators and features (no module needed)\n * **url**\n * **email**\n * **domain** — *domain.com*\n * **number** — *float/negative/positive/range/step*\n * **date** — *yyyy-mm-dd (format can be customized, more information below)*\n * **alphanumeric** — *with support for defining additional characters*\n * **length** — *min/max/range*\n * **required** — *no validation except that a value has to be given*\n * **custom** — *Validate value against regexp*\n * **checkboxgroup** — *ensure at least 1 checkbox in group has been selected*\n * Show help information automatically when input is focused\n * Validate given values immediately when input looses focus.\n * Make validation optional by adding attribute data-validation-optional=\"true\" to the element. This means\n that the validation defined in data-validation only will take place in case a value is given.\n * Make validation dependent on another input of type checkbox being checked by adding attribute\n data-validation-if-checked=\"name of checkbox input\"\n * Create input suggestions with ease, no jquery-ui needed\n * to apply multiple validators to an input element, separate the validator names using a space (ex: required email)\n\nRead the documentation for the default features at [#default-validators](#default-validators)\n\n### Module: security\n * **spamcheck**\n * **confirmation**\n * **creditcard**\n * **CVV**\n * **strength** — *Validate the strength of a password*\n * **server** — *Validate value of input on server side*\n * **letternumeric** — *Validate that the input value consists out of only letters and/or numbers*\n * **recaptcha** - *Validate Google [reCaptcha 2](https://www.google.com/recaptcha/intro/index.html)*\n\nRead the documentation for the security module at [#security-validators](#security-validators)\n\n### Module: date\n * **time** — *hh:mm*\n * **birthdate** — *yyyy-mm-dd, not allowing dates in the future or dates that's older than 122 years (format can be customized, more information below)*\n\nRead the documentation for the date module at [#date-validators](#date-validators)\n\n### Module: location\n * **country**\n * **federatestate**\n * **longlat**\n * Suggest countries (english only)\n * Suggest states in the US\n\nRead the documentation for the location module at [#location-validators](/#location-validators)\n\n### Module: file\n * **mime**\n * **extension**\n * **size** (file size)\n * **dimension** (size dimension and ratio)\n\nRead the documentation for the file module at [#file-validators](#file-validators)\n\n### Module: logic\n\n* **Dependent validation**\n* **Require \"one-of\"**\n\nRead the documentation for this module at [/#logic](#logic)\n\n### Module: sepa\n\n* **IBAN**\n* **BIC**\n* **Sepa**\n\nRead the documentation for this module at [http://formvalidator.net/#sepa](http://www.formvalidator.net/#sepa)\n\n\n### Module: sweden\n * **swemob** — *validate that the value is a swedish mobile telephone number*\n * **swesec** — *validate swedish social security number*\n * **county** - *validate that the value is an existing county in Sweden*\n * **municipality** - *validate that the value is an existing municipality in Sweden*\n * Suggest county\n * Suggest municipality\n\nRead the documentation for the Swedish module at [http://formvalidator.net/#sweden-validators](http://www.formvalidator.net/#country-specific-validators_sweden)\n\n### Module: uk\n * **ukvatnumber**\n * **uknin**\n * **ukutr**\n\nRead the documentation for the UK module at [http://formvalidator.net/#uk-validators](http://www.formvalidator.net/#country-specific-validators_uk)\n\n### Module: brazil\n * **brphone** — *Validate a brazilian telephone number*\n * **cep**\n * **cpf**\n\n### Module: poland\n * **plpesel** - *validate polish personal identity number (in Polish identity cards)*\n * **plnip** - *validate polish VAT identification number*\n * **plregon** - *validate polish bussiness identity number*\n\n### Module: color\n * **hex** - *validate hex color format*\n * **rgb** - *validate rgb color format*\n * **rgba** - *validate rgba color format*\n * **hsl** - *validate hsl color format*\n * **hsla** - *validate hsla color format*\n\n### Module: sanitation\n * **trim**\n * **trimLeft**\n * **trimRight**\n * **upper**  — Convert all letters to upper case\n * **lower**  — Convert all letters to lower case\n * **capitalize**  — Convert the first letter in all words to upper case\n * **insertRight**  — Declare a text that should be inserted at the end of the value, attribute data-sanitize-insert-right\n * **insertLeft**  — Declare a text that should be inserted at the beginning of the value, attribute data-sanitize-insert-left\n * **escape**  — Convert \u003c \u003e \u0026 ' \" to html entities\n * **strip**  — Comma separated list with words that gets automatically removed\n * **numberFormat**  — Declare the attribute data-sanitize-number-format with any of the formats described on http://numeraljs.com/. Note that this rule requires that numeral.js is included in the page\n\nRead the documentation for the sanitation module at [http://formvalidator.net/#data-sanitation](http://formvalidator.net/#data-sanitation)\n\n\n## Writing a custom validator\nYou can use the function `$.formUtils.addValidator()` to add your own validation function. Here's an example of a validator\nthat checks if the input contains an even number.\n\n```html\n\u003cform action=\"\" method=\"POST\"\u003e\n    \u003cp\u003e\n        \u003cinput type=\"text\" data-validation=\"even\" /\u003e\n    \u003c/p\u003e\n    ...\n\u003c/form\u003e\n\u003cscript src=\"js/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"js/form-validator/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\n    // Add validator\n    $.formUtils.addValidator({\n        name : 'even',\n        validatorFunction : function(value, $el, config, language, $form) {\n            return parseInt(value, 10) % 2 === 0;\n        },\n        errorMessage : 'You have to answer an even number',\n        errorMessageKey: 'badEvenNumber'\n    });\n\n    // Initiate form validation\n    $.validate();\n\n\u003c/script\u003e\n```\n\n### Required properties passed into $.formUtils.addValidator\n\n*name* - The name of the validator, which is used in the validation attribute of the input element.\n\n*validatorFunction* - Callback function that validates the input. Should return a boolean telling if the value is considered valid or not.\n\n*errorMessageKey* - Name of language property that is used in case the value of the input is invalid.\n\n*errorMessage* - An alternative error message that is used if errorMessageKey is left with an empty value or isn't defined\nin the language object. Note that you also can use [inline error messages](http://formvalidator.net/#localization) in your form.\n\n\nThe validation function takes these five arguments:\n- value — the value of the input thats being validated\n- $el — jQuery object referring to the input element being validated\n- config — Object containing the configuration of this form validation\n- language — Object with error dialogs\n- $form — jQuery object referring to the form element being validated\n\n## Creating a custom module\n\nA \"module\" is basically a javascript file containing one or more calls to [$.formUtils.addValidator()](#writing-a-custom-validator).\nThe module file must be placed in the same directory as `jquery.form-validator.min.js` if you want it to load automatically via the setup function.\n\nYou can use the method `$.formUtils.loadModules` if you want to load the module from a custom path.\n\n```js\n$.formUtils.loadModules('customModule otherCustomModule', 'js/validation-modules/');\n$.validate({\n   modules: 'security, date'\n});\n```\n\nThe first argument of `$.formUtils.loadModules` is a comma separated string with names of module files, without\nfile extension.\n\nThe second argument is the path where the module files are located. This argument is optional, if not given\nthe module files has to be located in the same directory as the core modules shipped together with this jquery plugin\n(js/form-validator/)\n\n## Show help information\nIt is possible to display help information for each input. The information will fade in when input is focused and fade out when input looses focus.\n\n```html\n\u003cform action=\"\" id=\"my_form\"\u003e\n\t\u003cp\u003e\n\t  \u003cstrong\u003eWhy not:\u003c/strong\u003e\n\t  \u003ctextarea name=\"why\" data-validation-help=\"Please give us some more information\" data-validation=\"required\"\u003e\u003c/textarea\u003e\n\t\u003c/p\u003e\n\t...\n```\n\n## Fully customizable\n\nRead about how to customize this plugin over at [http://formvalidator.net/#configuration](http://formvalidator.net/#configuration)\n\n### Validate On Event ###\nYou can cause an element to be validated upon the firing of an event, by attaching an attribute to the form input element named `data-validation-event=\"click\"`. When the configuration settings have `validateOnEvent : true`, the click event will trigger the onBlur validaton for that element. Possible use case: Checkboxes. Instead of waiting for the checkbox to lose focus (blur) and waiting for a validation to occurr, you can specify that elements validation should occur as soon as that checkbox element is clicked.\n\n## Localization\n\nThis plugin comes with translations for English, Polish,\n  Romanian,\n  Danish,\n  Norwegian,\n  Dutch,\n  Czech,\n  Catalan,\n  Russian,\n  Italian,\n  French,\n  German,\n  Swedish and\n  Portuguese. You can also choose to override the error\ndialogs yourself. Here you can read more about [localization](http://formvalidator.net/#localization)\n\n# Default validators\n\n### Answer length (required)\n\n```\n\u003c!-- Require an answer (can be applied to all types of inputs and select elements) --\u003e\n\u003cinput type=\"text\" data-validation=\"required\"\u003e\n\u003cinput type=\"checkbox\" name=\"agreement\" data-validation=\"required\"\u003e\n\u003cselect name=\"answer\" data-validation=\"required\"\u003e\n  \u003coption value=\"\"\u003e - - Answer - - \u003c/option\u003e\n  \u003coption\u003eYes\u003c/option\u003e\n  \u003coption\u003eNo\u003c/option\u003e\n\u003c/select\u003e\n\n\u003c!-- Max 100 characters --\u003e\n\u003cinput type=\"text\" data-validation=\"length\" data-validation-length=\"max100\"\u003e\n\n\u003c!-- Minimum 20 characters --\u003e\n\u003cinput type=\"text\" data-validation=\"length\" data-validation-length=\"min20\"\u003e\n\n\u003c!-- No less than 50 characters and no more than 200 characters --\u003e\n\u003cinput type=\"text\" data-validation=\"length\" data-validation-length=\"50-200\"\u003e\n\n\u003c!-- Require that atleast 2 options gets choosen --\u003e\n\u003cselect multiple=\"multiple\" size=\"5\" data-validation=\"length\" data-validation-length=\"min2\"\u003e\n  \u003coption\u003eA\u003c/option\u003e\n  \u003coption\u003eB\u003c/option\u003e\n  \u003coption\u003eC\u003c/option\u003e\n  \u003coption\u003eD\u003c/option\u003e\n  \u003coption\u003eE\u003c/option\u003e\n\u003c/select\u003e\n```\nThis plugin also supports the attributes \"required\" and \"maxlength\" by using the Html5 module.\n\n### Numbers\n```\n\u003c!-- Any numerical value --\u003e\n\u003cinput type=\"text\" data-validation=\"number\"\u003e\n\n\u003c!-- Only allowing float values --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"float\"\u003e\n\n\u003c!-- Allowing float values and negative values --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"float,negative\"\u003e\n\n\u003c!-- Validate float number with comma separated decimals --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"float\" \n\t\t data-validation-decimal-separator=\",\"\u003e\n\n\u003c!-- Only allowing numbers from 1 to 100 --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"range[1;100]\"\u003e\n\n\u003c!-- Only allowing numbers from -50 to 30 --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"range[-50;30],negative\"\u003e\n\n\u003c!-- Only allowing numbers from 0.05 to 0.5 --\u003e\n\u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"range[0.05;0.5],float\"\u003e\nYou can also define the decimal separator when initializing the validation.\n\n\u003cp\u003e\n    \u003cstrong\u003eAverage points\u003c/strong\u003e\u003cbr\u003e\n    \u003cinput type=\"text\" data-validation=\"number\" data-validation-allowing=\"float\"\u003e\n  \u003c/p\u003e\n  ....\n\u003c/form\u003e\n\u003cscript\u003e\n  $.validate({\n    decimalSeparator : ','\n  });\n\u003c/script\u003e\n```\nInputs of type \"number\" will also become validated by loading the html5 module.\n\n### E-mail\n```\n\u003cinput type=\"text\" data-validation=\"email\"\u003e\n```\nInputs of type \"email\" will also become validated by loading the html5 module.\n\n### URL:s\n\n```\n\u003cinput type=\"text\" data-validation=\"url\"\u003e\n```\nInputs of type \"url\" will also become validated by loading the html5 module.\n\n### Date\n\n```\n\u003c!-- Validate date formatted yyyy-mm-dd --\u003e\n\u003cinput type=\"text\" data-validation=\"date\"\u003e\n\n\u003c!-- Validate date formatted yyyy-mm-dd but dont require leading zeros --\u003e\n\u003cinput type=\"text\" data-validation=\"date\" data-validation-require-leading-zero=\"false\"\u003e\n\n\u003c!-- Validate date formatted dd/mm/yyyy --\u003e\n\u003cinput type=\"text\" data-validation=\"date\" data-validation-format=\"dd/mm/yyyy\"\u003e\n```\n\nSee the date module for further validators.\n\n### Alphanumeric\n\n```\n\u003c!-- This input requires an answer that contains only letters a-z and/or numbers --\u003e\n\u003cinput type=\"text\" data-validation=\"alphanumeric\"\u003e\n\n\u003c!-- This input requires the same as the one above but it also allows hyphen and underscore --\u003e\n\u003cinput type=\"text\" data-validation=\"alphanumeric\" data-validation-allowing=\"-_\"\u003e\n```\nIf you want to allow any kind of letters (not only A-Z) you're looking for the letternumeric validator.\n\n### Checkboxes Group\nValidate qty of checkboxes in a group (same name) have been checked, using min, max or range. Only the first checkbox element in the group needs to have the validation attributes added.\n```\n\u003c!-- Require checkboxes in this group, min1 --\u003e\n\u003cinput type=\"checkbox\" name=\"newsletters[]\" data-validation=\"checkbox_group\" data-validation-qty=\"min1\"\u003e\n\u003c!-- Require checkboxes in this group, max3 --\u003e\n\u003cinput type=\"checkbox\" name=\"newsletters[]\" data-validation=\"checkbox_group\" data-validation-qty=\"max3\"\u003e\n\u003c!-- Require checkboxes in this group, min1, max4 --\u003e\n\u003cinput type=\"checkbox\" name=\"newsletters[]\" data-validation=\"checkbox_group\" data-validation-qty=\"1-4\"\u003e\nIf your checkboxes group is generated by a server-side script and you don't want to add the validation attributes to each input element, you can use this javascript snippet before calling the validatorLoad() function\n\n\u003c!-- Add validation attributes to first input element in\n checkboxes group, before loading validator --\u003e\n\u003cscript\u003e\n$(\"[name='newsletters[]']:eq(0)\")\n  .valAttr('','validate_checkbox_group')\n  .valAttr('qty','1-2')\n  .valAttr('error-msg','chose 1, max 2');\n\u003c/script\u003e\nRegexp\n\u003c!-- This input would only allow lowercase letters a-z --\u003e\n\u003cinput type=\"text\" data-validation=\"custom\" data-validation-regexp=\"^([a-z]+)$\"\u003e\n```\n\nThis plugin also supports the attribute \"pattern\" by using the Html5 module.\n\n### Character count down\n```\n\u003cp\u003e\n    History (\u003cspan id=\"maxlength\"\u003e50\u003c/span\u003e characters left)\n    \u003ctextarea rows=\"3\" id=\"area\"\u003e\u003c/textarea\u003e\n  \u003c/p\u003e\n\u003cscript\u003e\n  $('#area').restrictLength($('#maxlength'));\n\u003c/script\u003e\n```\n### Make validation optional\n```\n\u003c!-- This input will only be validated if a value is given --\u003e\n\u003cinput type=\"text\" data-validation=\"url\" data-validation-optional=\"true\"\u003e\n```\nYou can also use the logic module if you want the validation of an input depend on another input having a value.\n\n### Display help text\nIt is possible to display help information beside each input. The text will fade in when the input gets focus on and fade out when the input looses focus. The container for the help text will have the class form-help. If you don't want this feature you can read the setup guide on how to disable it.\n\n```\n\u003cform action=\"\" id=\"some-form\"\u003e\n    \u003cp\u003e\n      \u003cstrong\u003eWhy not?\u003c/strong\u003e\n      \u003cinput name=\"why\" data-validation-help=\"Please give us some more information\"\u003e\n    \u003c/p\u003e\n    ...\n  \u003c/form\u003e\n  ```\n### Validate inputs when blurred\n\nBy default each input will become validated immediately when the input looses focus. If you don't want this feature you can read the setup guide on how to disable it.\n\n### Input suggestions\nThere are two ways you can give suggestions to the user while the user types.\n\n1) Using attribute data-suggestions\n\n```\n\u003cp\u003e\n    What's your favorite color?\n    \u003cinput name=\"color\" data-suggestions=\"White, Green, Blue, Black, Brown\"\u003e\n  \u003c/p\u003e\n  ...\n\u003c/form\u003e\n```\n2) Using $.formUtils.suggest()\n```\n\u003cscript\u003e\n  var largeArray = [];\n  largeArray.push('Something');\n  largeArray.push('Something else');\n  ...\n\n  $.formUtils.suggest( $('#the-input'), largeArray );\n\u003c/script\u003e\n```\nThis plugin also supports the data-list element by using the Html5 module.\n\nIgnoring characters\nYou can tell any validator to ignore certain characters by using the attribute data-validation-ignore (comma separated list).\n```\n\u003cp\u003e\n  How much do you want to donate?\n  \u003c!-- Make it optional to end the amount with a dollar-sign --\u003e\n  \u003cinput name=\"color\" data-validation=\"number\" data-validation-ignore=\"$\"\u003e\n\u003c/p\u003e\n```\n\n## Security validators\u003c\n\n### Password confirmation\n\nThis validator can be used to validate that the values of two inputs are the same. The first input should have a name suffixed with \u003cem\u003e_confirmation\u003c/em\u003e and the second should have the same name but without the suffix.\n\n```\n\u003cp\u003e\n    Password (at least 8 characters)\n    \u003cinput name=\"pass_confirmation\" data-validation=\"length\" data-validation-length=\"min8\"\u003e\n\n    Confirm password\n    \u003cinput name=\"pass\" data-validation=\"confirmation\"\u003e\n\u003c/p\u003e\n```\n\n```\n\u003cp\u003e\n    E-mail\n    \u003cinput name=\"user-email\" data-validation=\"email\" /\u003e\n\n    Repeat e-mail\n    \u003cinput name=\"repeat\" data-validation=\"confirmation\" data-validation-confirm=\"user-email\" /\u003e\n\u003c/p\u003e\n```\n\n### Password strength\n\nUse this validator to make sure that your user has a strong enough password. Set attribute \u003ccode\u003edata-validation-strength\u003c/code\u003e to 1, 2 or 3 depending on how strong password you require.\n\nIf you want the strength of the password to be displayed while the user types you call \u003ccode\u003edisplayPasswordStrength()\u003c/code\u003e in the end of the form.\n\n```\n\u003cform action=\"\"\u003e\n    \u003cp\u003e\n        \u003cstrong\u003ePassword:\u003c/strong\u003e\n        \u003cinput name=\"pass\" type=\"password\" break=\"\"\n                data-validation=\"strength\" break=\"\" data-validation-strength=\"2\"\u003e\n    \u003c/p\u003e\n    ...\n\u003c/form\u003e\n\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$.validate({\n    modules : 'security',\n    onModulesLoaded : function() {\n        var optionalConfig = {\n            fontSize: '12pt',\n            padding: '4px',\n            bad : 'Very bad',\n            weak : 'Weak',\n            good : 'Good',\n            strong : 'Strong'\n        };\n\n        $('input[name=\"pass\"]').displayPasswordStrength(optionalConfig);\n    }\n});\n\u003c/script\u003e\n```\n\n### Server side validation\n\nBy using this validator you can validate the value given by the user on the server before the form gets submitted. The validation function will send a POST request to the URL declared in \u003ccode\u003edata-validation-url\u003c/code\u003e. The argument posted to the URL will have the same name as the input being validated.\n\nThe form will get the class \u003cem\u003evalidating-server-side\u003c/em\u003e while the server is being requested.\n\nThe response from the validation script must be a JSON formatted object, containing the properties \"valid\" and \"message\".\n\n```\n{\n    \"valid\" : true|false,\n    \"message\" : \"String with text that should be displayed as error message\"\n}\n```\n\n#### Form\n\n```\n\u003cform action=\"\"\u003e\n    \u003cp\u003e\n        \u003cstrong\u003eUser name:\u003c/strong\u003e\n        \u003cinput name=\"user\" data-validation=\"server\" data-validation-url=\"/validate-input.php\"\u003e\n    \u003c/p\u003e\n    ...\n\u003c/form\u003e\n```\n\n#### /validate-input.php\n\n```\n\u003c?php\n$response = array(\n    'valid' =\u003e false,\n    'message' =\u003e 'Post argument \"user\" is missing.'\n);\n\nif( isset($_POST['user']) ) {\n    $userRepo = new UserRepository( DataStorage::instance() );\n    $user = $userRepo-\u003eloadUser( $_POST['user'] );\n\n    if( $user ) {\n        // User name is registered on another account\n        $response = array('valid' =\u003e false, 'message' =\u003e 'This user name is already registered.');\n    } else {\n        // User name is available\n        $response = array('valid' =\u003e true);\n    }\n}\necho json_encode($response);\n```\n\n**Modifying the server request**\n\nThe parameter containing the input value, sent to the server, will by default have the same name as the input. You can however set your own parameter name by using the attribute \u003ccode\u003edata-validation-param-name\u003c/code\u003e. You can also send along other parameters to the server by using the attribute \u003ccode\u003edata-validation-req-params\u003c/code\u003e.\n\n```\n\u003c?php\n  $json = json_encode(array('user'=\u003e$user-\u003eget('ID')));\n?\u003e\n\u003cp\u003e\n  \u003cstrong\u003eE-mail:\u003c/strong\u003e\n  \u003cinput type=\"email\" name=\"check-email\" data-validation=\"server\"\n              data-validation-url=\"/validate-form-input.php\"\n              data-validation-param-name=\"email\"\n              data-validation-req-params=\"\u003c?php echo $json ?\u003e\" /\u003e\n\u003c/p\u003e\n```\n\n### Credit card validation\n\nThis validator makes it possible to validate any of the credit cards VISA, Mastercard, Diners club, Maestro, CJB, Discover and American express\n\n```\n\u003c-- Accept credit card number from Visa, Mastercard and American Express --\u003e\n\u003cp\u003e\n    Credit card number\n    \u003cinput data-validation=\"creditcard\" data-validation-allowing=\"visa, mastercard, amex\" /\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    Security code (cvv)\n    \u003cinput name=\"cvv\" data-validation=\"cvv\" /\u003e\n\u003c/p\u003e\n```\n\nYou can also let the user choose a credit card and programmatically change the allowed credit card on the input of the card number.\n\n```\n\u003cp\u003e\n    Credit card\n    \u003cselect name=\"credit-card\" id=\"credit-card\"\u003e\n        \u003coption value=\"visa\"\u003eVISA\u003c/option\u003e\n        \u003coption value=\"mastercard\"\u003eMastercard\u003c/option\u003e\n        \u003coption value=\"amex\"\u003eAmerican express\u003c/option\u003e\n        \u003coption value=\"diners_club\"\u003eDiners club\u003c/option\u003e\n        \u003coption value=\"discover\"\u003eDiscover\u003c/option\u003e\n        \u003coption value=\"cjb\"\u003eCJB\u003c/option\u003e\n        \u003coption value=\"maestro\"\u003eMaestro\u003c/option\u003e\n    \u003c/select\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    Credit card number\n    \u003cinput name=\"creditcard_num\" data-validation=\"creditcard\" data-validation-allowing=\"visa\" /\u003e\n\u003c/p\u003e\n...\n\u003c/div\u003e\n\u003cscript\u003e\n$.validate({\n    modules : 'security',\n    onModulesLoaded : function() {\n        // Bind card type to card number validator\n        $('#credit-card').on('change', function() {\n            var card = $(this).val();\n            $('input[name=\"creditcard_num\"]').attr('data-validation-allowing', card);\n        });\n    }\n});\n\u003c/script\u003e\n```\n\n### Simple captcha\n\n```\n\u003c?php\nsession_start();\nif( isset($_POST['captcha']) \u0026\u0026 isset($_SESSION['captcha'])) {\n    if( $_POST['captcha'] != ($_SESSION['captcha'][0]+$_SESSION['captcha'][1]) ) {\n        die('Invalid captcha answer');  // client does not have javascript enabled\n    }\n    // process form data\n    ...\n}\n$_SESSION['captcha'] = array( mt_rand(0,9), mt_rand(1, 9) );\n?\u003e\n\u003cform action=\"\"\u003e\n    \u003cp\u003e\n        What is the sum of \u003c?=$_SESSION['captcha'][0]?\u003e + \u003c?=$_SESSION['captcha'][1]?\u003e?\n        (security question)\n        \u003cinput name=\"captcha\" data-validation=\"spamcheck\"\n                    data-validation-captcha=\"\u003c?=( $_SESSION['capthca'][0] + $_SESSION['captcha'][1] )?\u003e\"/\u003e\n    \u003c/p\u003e\n    \u003cp\u003e\u003cinput type=\"submit\" /\u003e\u003c/p\u003e\n\u003c/form\u003e\n```\n\n### Google reCAPTCHA\n\nUse this validator if wanting to integrate the Google service reCAPTCHA.\n\n``` \n\u003cp\u003e\n    \u003cinput  data-validation=\"recaptcha\" data-validation-recaptcha-sitekey=\"[RECAPTCHA_SITEKEY]\"\u003e\n\u003c/p\u003e\n```\n\nYou can also use the setup function to configure the recaptcha service.\n\n```\n$.validate({\n    reCaptchaSiteKey: '...',\n    reCaptchaTheme: 'light'\n});\n```\n\n### Letters and numbers\n\nBy using the validator \u003ccode\u003eletternumeric\u003c/code\u003e you can validate that given input value only contains letters and/or numbers. This validator allows any type of character in contrast to the \u003ca href=\"#default-validators_alphanumeric\"\u003ealphanumeric\u003c/a\u003e validator, which only allows letters A-Z.\n\n```\n\u003c!-- This input requires an answer that contains only letters and/or numbers --\u003e\n\u003cinput type=\"text\" data-validation=\"letternumeric\"\u003e\n\n\u003c!-- This input requires the same as the one above but it also allows hyphen and underscore --\u003e\n\u003cinput type=\"text\" data-validation=\"alphanumeric\" data-validation-allowing=\"-_\"\u003e\n```\n\n## Date validators\n\n### Birthdate\n\nThis validator is the same as the default \u003ca href=\"#default-validators_dates\"\u003edate validator\u003c/a\u003e except that it only allows past dates and dates that is not older than 120 years.\n\n```\n\u003c!-- Validate birth date formatted yyyy-mm-dd --\u003e\n\u003cinput type=\"text\" data-validation=\"birthdate\"\u003e\n\n\u003c!-- Validate birthdate formatted yyyy-mm-dd but dont require leading zeros --\u003e\n\u003cinput type=\"text\" data-validation=\"birthdate\" data-validation-require-leading-zero=\"false\"\u003e\n\n\u003c!-- Validate birth date formatted dd/mm/yyyy --\u003e\n\u003cinput type=\"text\" data-validation=\"birthdate\" data-validation-format=\"dd/mm/yyyy\"\u003e\n```\n\n## Time\n\n```\n\u003c!-- Validate time formatted HH:mm --\u003e\n\u003cinput type=\"text\" data-validation=\"time\"\u003e\n```\n\n\n## Location validators\n\n### Country\n\n```\n\u003c!-- Validate country (english only) --\u003e\n\u003cinput type=\"text\" data-validation=\"country\"/\u003e\n```\n\n### State (US)\n\n```\n\u003c!-- Validate US state --\u003e\n\u003cinput type=\"text\" data-validation=\"federatestate\"/\u003e\n```\n\n### Longitude and Latitude\n\n```\n\u003c!-- Validate longitude and latitude (eg 40.714623,-74.006605) --\u003e\n\u003cinput type=\"text\" data-validation=\"longlat\"/\u003e\n```\n\n### Suggest country/state\n\nBy using this function you'll make it easier for your visitor to input a country or state.\n\n```\n    \u003cform action=\"\"\u003e\n        ...\n        \u003cp\u003e\n            \u003cstrong\u003eWhich country are you from?\u003c/strong\u003e\n            \u003cinput name=\"user_country\" data-validation=\"country\"/\u003e\n        \u003c/p\u003e\n        \u003cp\u003e\n            \u003cstrong\u003eWhich state do you live in?\u003c/strong\u003e\n            \u003cinput name=\"user_home_state\" data-validation=\"federatestate\"/\u003e\n        \u003c/p\u003e\n    \u003c/form\u003e\n\u003c/div\u003e\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$.validate({\n    modules : 'location',\n    onModulesLoaded : function() {\n        $('input[name=\"user_country\"]').suggestCountry();\n        $('input[name=\"user_home_state\"]').suggestState();\n    }\n});\n\u003c/script\u003e\n```\n\n## File validators\n\n### File size\n\nThis validation is only supported by Internet Explorer 10, Mozilla FireFox v \u003e= 3.6 and any of the later versions of webkit based browsers.\n\n```\n\u003c!-- Validate that file isn't larger than 512 kilo bytes --\u003e\n\u003cinput type=\"file\" data-validation=\"size\" data-validation-max-size=\"512kb\" /\u003e\n\n\u003c!-- Validate that file isn't larger than 3 mega bytes --\u003e\n\u003cinput type=\"file\" data-validation=\"size\" data-validation-max-size=\"3M\" /\u003e\n```\n\n### File type\n\nThis validation will fall back on checking the file extension in older browsers. In modern browsers the validation will check that any of the extensions in \u003ccode\u003edata-validation-allowing\u003c/code\u003e exists in the mime type declaration of the file. This means that \u003ccode\u003edata-validation-allowing=\"pdf\"\u003c/code\u003e will work in both modern browsers (checking against \"application/pdf\") and older browsers (checking the file extension \".pdf\").\n\n```\n\u003c!-- Validate that file is an image of type JPG, GIF or PNG and not larger than 2 mega bytes --\u003e\n\u003cinput type=\"file\" data-validation=\"mime size\" break0=\"\" data-validation-allowing=\"jpg, png, gif\" break=\"\"\n       data-validation-max-size=\"2M\" /\u003e\n\n\u003c!-- Validate that a file is given and that it has .txt as extension --\u003e\n\u003cinput type=\"file\" data-validation=\"required extension\" data-validation-allowing=\"txt\" /\u003e\n```\n\nValidating multiple files (with separate error messages depending on failed validation):\n\n```\n\u003cinput type=\"file\" multiple=\"multiple\" name=\"images\"\n    data-validation=\"length mime size\"\n    data-validation-length=\"min2\"\n    data-validation-allowing=\"jpg, png, gif\"\n    data-validation-max-size=\"512kb\"\n    data-validation-error-msg-size=\"You can not upload images larger than 512kb\"\n    data-validation-error-msg-mime=\"You can only upload images\"\n    data-validation-error-msg-length=\"You have to upload at least two images\"\n    /\u003e\n```\n\n### Image dimension and ratio\n\nUse the validator \u003ccode\u003edimension\u003c/code\u003e to check the dimension of an image (jpg, gif or png).\n\n```\n\u003c!-- Validate that the image is no smaller than 100x100px --\u003e\n\u003cinput data-validation=\"dimension mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"min100\" /\u003e\n\n\u003c!-- Validate that the image is no smaller than 300x500 px (width/height) --\u003e\n\u003cinput data-validation=\"dimension mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"min300x500\" /\u003e\n\n\u003c!-- Validate that the image is no larger than 500x1000 px --\u003e\n\u003cinput data-validation=\"dimension mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"max500x1000\" /\u003e\n\n\u003c!-- Validate that the image is no smaller than 100x100 px and no larger than 800x800 --\u003e\n\u003cinput data-validation=\"dimension mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"100-800\" /\u003e\n\n\u003c!-- Validate that the image is no smaller than 200x400 px and no larger than 600x1200 --\u003e\n\u003cinput data-validation=\"dimension mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"200x400-600x1200\" /\u003e\n```\n\nUse the attribute \u003ccode\u003edata-validation-ratio\u003c/code\u003e to validate that the uploaded image has a certain ratio\n\n```\n\u003c!-- Validate that only square images gets uploaded --\u003e\n\u003cinput data-validation=\"ratio mime\" data-validation-allowing=\"jpg, png, gif\" break=\"\" data-validation-dimension=\"min100\" data-validation-ratio=\"1:1\" /\u003e\n\n\u003c!-- Validate that only somewhat square images gets uploaded --\u003e\n\u003cinput data-validation=\"ratio mime\" data-validation-allowing=\"jpg\" break=\"\" data-validation-dimension=\"min100\" data-validation-ratio=\"8:10-12:10\" /\u003e\n```\n\n## Logic\n\n### Validators depending on each other\n\nUse the attributes \u003ccode\u003edata-validation-depends-on\u003c/code\u003e to configure that an input is optional as long as another input is left without an answer.\n\n```\n\u003c!-- Require e-mail only if checkbox is checked --\u003e\n\u003cp\u003e\n    \u003cstrong\u003eContact me:\u003c/strong\u003e\n    \u003cinput name=\"do-contact\" type=\"checkbox\" value=\"1\" /\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003cstrong\u003eE-mail:\u003c/strong\u003e\n    \u003cinput\n           type=\"text\"\n           data-validation=\"email\"\n           data-validation-depends-on=\"do-contact\"\n    /\u003e\n\u003c/p\u003e\n```\n\n```\n\u003c!-- Require a state to be given if the user comes from either USA or Canada --\u003e\n\u003cp\u003e\n    \u003cstrong\u003eCountry:\u003c/strong\u003e\n    \u003cinput\n           type=\"text\"\n           name=\"country\"\n           id=\"country-input\"\n           data-validation=\"country\"\n    /\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\n    \u003cstrong\u003eState:\u003c/strong\u003e\n    \u003cinput type=\"text\"\n           name=\"state\" break=\"\"\n           data-validation=\"required\" break1=\"\"\n           data-validation-depends-on=\"country\" break2=\"\"\n           data-validation-depends-on-value=\"usa, canada\"\n    /\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n...\n\u003cscript src=\"//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n$.validate({\n    modules : 'location, logic',\n    onModulesLoaded : function() {\n        $('#country-input').suggestCountry();\n    }\n});\n\u003c/script\u003e\n```\n\n### Require only one out of several inputs\n\nUse the attribute \u003ccode\u003edata-validation-optional-if-answered\u003c/code\u003e to tell the validator that only one, out of a group of inputs, requires an answer.\n\n```\n\u003cp\u003e\n    \u003cstrong\u003eHome phone number:\u003c/strong\u003e\n    \u003cinput name=\"home-phone\"\n           data-validation=\"number\" break=\"\"\n            data-validation-optional-if-answered=\"cell-phone, work-phone\" /\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003cstrong\u003eCell phone number:\u003c/strong\u003e\n    \u003cinput name=\"cell-phone\"\n           data-validation=\"number\" break=\"\"\n            data-validation-optional-if-answered=\"home-phone, work-phone\" /\u003e\n\u003c/p\u003e\n\u003cp\u003e\n    \u003cstrong\u003eWork phone number:\u003c/strong\u003e\n    \u003cinput name=\"work-phone\"\n           data-validation=\"number\" break=\"\"\n            data-validation-optional-if-answered=\"home-phone, cell-phone\" /\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n```\n\n## Changelog\n\n#### 2.3.19\n- New translations (Polish, Romanian, Danish, Norwegian, Dutch, Czech, Russian, Italian)\n- Several improvements made to already existing translations\n- \"Validation help\" no longer puts constraints on input names\n- Improved confirmation validation\n- Config parameter `errorMessagePosition` is now only used to point out where error message should be placed. New configuration parameters is introduced that handles custom positioning of error messages [#226](https://github.com/victorjonsson/jQuery-Form-Validator/issues/226#issuecomment-191233456)\n- Now possible to add `data-validation-ignore` to filter out certain characters before validation\n- New sanitation method `strip` that removes defined characters\n- Now possible to declare attributes not prefixed with data-validation in jsconf module\n- All inputs gets sanitized on page load when using sanitation module\n- Allow dates to omit leading zero using `data-validation-require-leading-zero=\"false\"`\n- Module toggleDisabled now acts on value change, not only mouse click\n- `data-validation-if-checked` now deprecated, use `data-validation-depends-on` instead [#153](https://github.com/victorjonsson/jQuery-Form-Validator/issues/153)\n- Event `beforeValidation` now gets value, language and configuration as arguments and can be used to prevent validation of the input.\n- Security module now has a `recaptcha` validator that uses Google reCaptcha 2\n- The plugin is installable using npm (also possible to require validation modules when using browserify)\n- Polish validation module\n- Brazilian validation module\n- UK validation module now also have validators `uknin` `ukutr`\n- Sepa-module that makes it possible to validate sepa, iban and bic.\n- New module named \"logic\" containing the features `data-validation-depends-on` and `data-validation-optional-if-answered`\n\n#### 2.2.8\n- The plugin is now again possible to install via bower.\n- Portoguese language pack and validators\n- New module used for data-sanitiation\n- E-mail addresses now validated in accordance to rfc 6531\n- Now possible to use $.fn.validate to programmatically validate inputs\n- Hidden inputs won't get validated by default (can be overriden using option validateHiddenInputs)\n\n\n#### 2.2.43\n- Fixed min/max parse error in HTML5 module\n- Now also supports Twitter bootstraps horizontal forms\n- This plugin now also distributes a default CSS theme including success/fail icons (used on formvalidator.net)\n- Email validation now won't fail if email begins with a number\n- This plugin now comes with error dialogs translated to English, French, German, Spanish and English.\n- New validator `letternumeric`. Validates that input consists out of any type of letter (not only alphanumeric) and/or numbers\n- You can now validate image dimension and ratio\n- ... and a bunch of other smaller bug fixes and improvements.\n\n#### 2.2.0\n* Now possible to define an error message for each validation rule on a certain input (issue #113)\n* This plugin now serves as a html5 fallback. You can now use the native attributes to declare which type\nof validation that should be applied.\n* Use a template for error messages when having errorMessagePosition set to top\n* Added validation of credit card number and CVV to the security module\n* Event onElementValidate added\n* Use the attribute data-validation-confirm to declare which input that should be confirmed when using validation=confirmation (issue #112)\n* Validation \"required\" now supports inputs of type radio\n* $.validateForm is now deprecated, use $.isValid instead\n* Possible to check if form is valid programmatically without showing error messages\n* Select elements can now be validated server-side\n* Cleaned up dialog messages\n* Various IE8 fixes\n* Possible to send along parameters to the server when using server side validation\n* Now possible to set your own parameter name when using server side validation\n* Improved/simplified URL validation\n* ... and a whole lot more small improvements\n\n#### 2.1.47\n* Incorrect error-styling when using datepicker or suggestions is now fixed\n* Incorrect error-styling of select elements is now fixed\n* Deprecated function $.validationSetup is now removed, use $.validate() instead\n* You can now return an array with errors using the event `onValidate`\n* You can now declare an element where all error messages should be placed (config.errorMessagePosition)\n\n#### 2.1.36\n* Now possible to use the native reset() function to clear error messages and error styling of the input elements\n\n#### 2.1.34\n* General improvements and bug fixes\n* Added events \"beforeValidation\" and \"validation\" (see http://formvalidator.net/#configuration_callbacks for more info)\n\n#### 2.1.27\n * E-mail validation support .eu top domain\n * Improvements in server validation\n * Now possible to re-initiate the validation. This makes it possible to dynamically change the form and then call $.validate() again to refresh the validation (issue #59)\n * Number validation now supports range\n\n#### 2.1.15\n * E-mail addresses can now contain + symbol\n * Correction of the US states in validation \"federatestate\"\n * Fixed bug in server validation\n\n#### 2.1.09\n * File validation now support multiple files\n * Length validation can now be used to validate the number of uploaded files using a file input that supports multiple files\n * Validation classes is no longer applied on inputs that for some reason shouldn't become validated\n\n#### 2.1.08\n * Now possible to configure the decimal separator when validating float values. Use either the\n attribute *data-validation-decimal-separator* or the property *decimalSeparator* when\ncalling $.validate()\n * $.validationSetup is renamed to $.validate. You will still be able to initiate the validation by calling\n the $.validationSetup but it's considered deprecated.\n\n#### 2.1.06\n * Modules can now be loaded from remote websites\n\n#### 2.1.05\n * Fixed language bug (issue #43 on github)\n * Validation on server side is now triggered by the blur event\n * Now using class names that's compliant with twitter bootstrap 3.x\n\n#### 2.1\n * Code refactoring and some functions renamed\n * Validator \"checkbox_group\" added\n\n#### 2.0.7\n * Now possible to validate file size, extension and mime type (using the file module)\n\n#### 2.0\n * [min|max]_length is removed (now merged with length validation).\n * The number, int and float validation is merged together, all three variants is now validated by the number validation.\n * Phone validation is moved to \"sweden\" module and renamed to swephone.\n * The attribute to be used when defining the regular expression for custom validations is now moved to its own attribute (data-validation-regexp)\n * Length validation now looks at attribute data-validation-length (eg. min5, max200, 3-12).\n * The validation rule no longer needs to be prefixed with \"validate_\" (it's still possible to use the prefix but it's considered deprecated).\n * Some validation functions is moved to modules (see the function reference over at http://formvalidator.net).\n * Added function $.validationSetup() to reduce the amount of code that has to be written when initiating the form validation.\n\n\n## Credits\n\nhttp://www.formvalidator.net/#credits\n","funding_links":[],"categories":["10. 表单处理","JavaScript"],"sub_categories":["10.1 表单验证(Form Validator)/表单提示"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorjonsson%2FjQuery-Form-Validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictorjonsson%2FjQuery-Form-Validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictorjonsson%2FjQuery-Form-Validator/lists"}