{"id":20314343,"url":"https://github.com/normandy72/form-validation","last_synced_at":"2026-05-07T18:14:08.540Z","repository":{"id":153902787,"uuid":"593160649","full_name":"Normandy72/Form-Validation","owner":"Normandy72","description":"Form Validation in AngularJS. Coursera course \"Single Page Web Applications with AngularJS\" by Yaakov Chaikin.","archived":false,"fork":false,"pushed_at":"2023-01-25T12:45:04.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T02:03:18.877Z","etag":null,"topics":["angular","angularjs","css","css3","html","html5","javascript","js"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/Normandy72.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-25T11:35:11.000Z","updated_at":"2023-01-31T23:59:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c5ee248-deb8-443c-98fe-93266f610368","html_url":"https://github.com/Normandy72/Form-Validation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Normandy72/Form-Validation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FForm-Validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FForm-Validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FForm-Validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FForm-Validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Normandy72","download_url":"https://codeload.github.com/Normandy72/Form-Validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Normandy72%2FForm-Validation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263645556,"owners_count":23494005,"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":["angular","angularjs","css","css3","html","html5","javascript","js"],"created_at":"2024-11-14T18:14:52.368Z","updated_at":"2026-05-07T18:14:03.500Z","avatar_url":"https://github.com/Normandy72.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Form Validation\n### Example of form\n```\n\u003cform\u003e\n    \u003cinput type=\"text\"\u003e\n    \u003cinput type=\"textarea\"\u003e\n    \u003cinput type=\"checkbox\"\u003e\n    ...\n    \u003cinput type=\"submit\"\u003e\n\u003c/form\u003e\n```\n## Steps to Form Validation\n### Step 1: Create a form in HTML with name attributes\n```\n\u003cform name=\"formName\"\u003e\n    \u003cinput type=\"text\" name=\"name\"\u003e\n    \u003cbutton\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n### Step 2: Bind Input with ng-model\n```\n\u003cform name=\"formName\"\u003e\n    \u003cinput type=\"text\"\n           name=\"name\"\n           ng-model=\"ctrl.name\"\u003e\n    \u003cbutton ng-click=\"ctrl.go()\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n### Step 3: Declare HTML5 Validation Attributes\n```\n\u003cform name=\"formName\" novalidate\u003e\n    \u003cinput type=\"text\"\n           name=\"name\"\n           ng-model=\"ctrl.name\"\n           required\n           minlength=\"4\"\u003e\n    \u003cbutton ng-click=\"ctrl.go()\"\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n### Step 4: Use Angular Form Bound Objects\n```\n\u003cinput type=\"text\"\n       name=\"name\"\n       ng-model=\"ctrl.name\"\n       required\n       minlength=\"4\"\u003e\n\u003cspan ng-if=\"formName.name.$error.required \u0026\u0026 formName.name.$touched\"\u003e\n    Name is required\n\u003c/span\u003e\n...\n\u003cbutton ng-disable=\"formName.$invalid\"\n        ng-click=\"ctrl.go()\"\u003e\n    Submit\n\u003c/button\u003e\n```\n\n### Step 5: Use Angular Validation Styles\n```\n.ng-touched.ng-valid{\n    border: 2px green solid;\n}\n\n.ng-touched.ng-invalid{\n    border: 2px red solid;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Fform-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormandy72%2Fform-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormandy72%2Fform-validation/lists"}