{"id":18310333,"url":"https://github.com/torann/jquery.validation","last_synced_at":"2025-04-09T11:44:25.901Z","repository":{"id":66354616,"uuid":"109994254","full_name":"Torann/jquery.validation","owner":"Torann","description":"Simple form validation using the Laravel validation syntax.","archived":false,"fork":false,"pushed_at":"2018-05-29T20:38:45.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T05:43:43.950Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Torann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-08T15:33:09.000Z","updated_at":"2022-01-23T14:31:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b4ff6d4-f541-4696-ad7d-adda57baca02","html_url":"https://github.com/Torann/jquery.validation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torann%2Fjquery.validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torann%2Fjquery.validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torann%2Fjquery.validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Torann%2Fjquery.validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Torann","download_url":"https://codeload.github.com/Torann/jquery.validation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248033550,"owners_count":21036811,"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","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":"2024-11-05T16:14:09.199Z","updated_at":"2025-04-09T11:44:25.879Z","avatar_url":"https://github.com/Torann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery Validation\n\nSimple form validation using the Laravel validation syntax.\n\n## Getting started\n\nThe form containing the inputs that need validation must inlcude the class `js-validate`. This helpers cut down some on the walking the DOM.\n\n### Data Tags\n\n#### `data-validate=\":rules\"`\n\nThis attribute is on the form element that is being validated. It contains the rules used to validate.\n\n#### `data-validate-msg=\":rule\"`\n\nThis attribute is attached the the tag that is used inside of the input group and contains the translated values for the errors. The attributes value indicated the rule that failed.\n\n## Rules\n\n#### accepted\n\nThe field under validation must be *yes*, *on*, *1*, or *true*. This is useful for validating \"Terms of Service\" acceptance.\n\n#### alpha_num\n\nThe field under validation must be entirely alpha-numeric characters.\n\n#### between:*min*,*max*\n\nThe field under validation must have a size between the given *min* and *max*.\n\n#### date\n\nThe field under validation must be a valid date according to the `YYYY-MM-DD` or `YYYY/MM/DD`.\n\n#### email\n\nThe field under validation must be formatted as an e-mail address.\n\n#### in:*foo*,*bar*,...\n\nThe field under validation must be included in the given list of values.\n\n#### max:*value*\n\nThe field under validation must be less than or equal to a maximum *value*.\n\n#### min:*value*\n\nThe field under validation must have a minimum *value*.\n\n#### not_in:*foo*,*bar*,...\n\nThe field under validation must not be included in the given list of values.\n\n#### required\n\nThe field under validation must be present in the input data and not empty.\n\n#### time\n\nThe field under validation must be a valid time string.\n\n#### unique:*endpoint*,*except*\n\nThe field under validation must be unique. The `endpoint` is used to create the validation AJAX url `/ajax/:endpoint/check/:field`.\n\n## Example\n\n```html\n\u003cdiv class=\"input-field\"\u003e\n    \u003cselect name=\"country_code\" data-validate=\"required\"\u003e\n        \u003coption value=\"\"\u003eSelect Country\u003c/option\u003e\n        \u003coption value=\"US\"\u003eUnited States\u003c/option\u003e\n        \u003coption value=\"UK\"\u003eUnited Kingdom\u003c/option\u003e\n    \u003c/select\u003e\n    \u003cspan data-validate-msg=\"required\" hidden\u003e\n        A country must be selected.\n    \u003c/span\u003e\n\u003c/div\u003e\n\n\u003cdiv class=\"input-field\"\u003e\n    \u003cinput type=\"text\" name=\"city\" data-validate=\"required|max:255\"\u003e\n    \u003cspan data-validate-msg=\"required\" hidden\u003e\n        A city must be entered.\n    \u003c/span\u003e\n    \u003cspan data-validate-msg=\"max\" hidden\u003e\n        The city name has a max character length of 255.\n    \u003c/span\u003e\n\u003c/div\u003e\n```\n\n## Required Functions\n\n**Translation**\n\n[jQuery Translation](https://github.com/Torann/jquery-translation)\n\n**Snackbar**\n\nThis is built to use a simple snackbar helper function:\n\n```\n$.snackbar({\n    message: 'Message from the panel event',\n    style: 'error',\n    timeout: null\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorann%2Fjquery.validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorann%2Fjquery.validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorann%2Fjquery.validation/lists"}