{"id":16968286,"url":"https://github.com/kishor10d/validations","last_synced_at":"2026-05-18T08:01:27.544Z","repository":{"id":24218012,"uuid":"27610049","full_name":"kishor10d/Validations","owner":"kishor10d","description":"jQuery Validations using jzaefferer/jquery-validation","archived":false,"fork":false,"pushed_at":"2016-10-13T08:22:10.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T13:12:36.442Z","etag":null,"topics":["javascript","jquery-validation","jzaefferer"],"latest_commit_sha":null,"homepage":null,"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/kishor10d.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":"2014-12-05T21:03:43.000Z","updated_at":"2020-01-27T04:10:36.000Z","dependencies_parsed_at":"2022-08-22T14:00:16.117Z","dependency_job_id":null,"html_url":"https://github.com/kishor10d/Validations","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/kishor10d%2FValidations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishor10d%2FValidations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishor10d%2FValidations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishor10d%2FValidations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kishor10d","download_url":"https://codeload.github.com/kishor10d/Validations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244844531,"owners_count":20519790,"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":["javascript","jquery-validation","jzaefferer"],"created_at":"2024-10-14T00:11:26.980Z","updated_at":"2026-05-18T08:01:22.521Z","avatar_url":"https://github.com/kishor10d.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Validations\n===========\n\njQuery Validations using jzaefferer/jquery-validation\n\nThis is custom documentation for **jquery.validation.js.**\nThe purpose of this documentation is that to understand the custom validation method simply with examples.\n\nHere I am giving some examples so that you can understand the custom validation more friendly and you come to know that how awesome this jquery.validation plugin is...\n\nYou can declare the variable for form like below\n```\nvar form = $('#registrationForm');\n```\nBy using this \"form\" elemenent you can validate your form, look at the code below.\n```\nvar validator = form.validate({ });\n```\n\nInside the curly braces you can write your validation code.\n\nInbuilt things in Plugin:\n\n**1) rules :** These are the rules which you have to validate for particular field.\n\n**2) messages :** These are the custom messsages shown to user if field is not validated.\n\nThings written by me:\n\n**1) mobile2 :** This is the field name which I want to validate.\n\n**2) notEqualTo :** This is the custom rule to validate the mobile2 field.\n\n**3) checkMobileExist2 :** This is also custom rule to validate the mobile2 field.\n\nThe field not validates if all rules are not receiving **\"true\"** result from validation function.\n\nAfter this we have to see about the custom methods, not the **\"var validator\"** comes in focus.\nThe **validate()** method search for the methods which are associated with the **\"validator\"** object.\n\nHow to add methods to validator object?\n```\njQuery.validator.addMethod(\"notEqualTo\", function(value, element) {}, \"\");\n```\nHere **\"notEqualTo\"** the name of method which associated with **\"validator\"** object.\nInside **{}**, you have to write your validation logic.\nInside **\" \"**, you have to write your custom validation error message; If you are going to provide custome message in **\"messages\"** under **validate()** then you need not mentioned any message here, so you can left it blank.\n\n```\njQuery.validator.addMethod(\"notEqualTo\", function(value, element)\n{\n       if(value == $('#mobile1').val() \u0026\u0026 $('#mobile1').val() != \"\")\n       {\n              return false; \n       }\n       else\n       {\n              return true; \n       }\n},\"\");\n```\n       \nIn above code, I left **\" \"** blank because I already given message.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishor10d%2Fvalidations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkishor10d%2Fvalidations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishor10d%2Fvalidations/lists"}