{"id":16493349,"url":"https://github.com/thesharpieone/angular-validation-match","last_synced_at":"2026-04-02T01:43:58.906Z","repository":{"id":10451705,"uuid":"12621332","full_name":"TheSharpieOne/angular-validation-match","owner":"TheSharpieOne","description":"Checks if one input matches another.  Useful for confirming passwords, emails, or anything.","archived":false,"fork":false,"pushed_at":"2016-05-06T15:43:52.000Z","size":53,"stargazers_count":224,"open_issues_count":3,"forks_count":42,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-12T14:09:15.821Z","etag":null,"topics":["angular","confirming-passwords","form-validation","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheSharpieOne.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}},"created_at":"2013-09-05T15:28:29.000Z","updated_at":"2024-02-23T20:00:21.000Z","dependencies_parsed_at":"2022-09-10T23:57:04.569Z","dependency_job_id":null,"html_url":"https://github.com/TheSharpieOne/angular-validation-match","commit_stats":null,"previous_names":["thesharpieone/angular-input-match"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharpieOne%2Fangular-validation-match","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharpieOne%2Fangular-validation-match/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharpieOne%2Fangular-validation-match/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheSharpieOne%2Fangular-validation-match/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheSharpieOne","download_url":"https://codeload.github.com/TheSharpieOne/angular-validation-match/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"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","confirming-passwords","form-validation","javascript"],"created_at":"2024-10-11T14:09:17.749Z","updated_at":"2025-12-18T02:42:50.246Z","avatar_url":"https://github.com/TheSharpieOne.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/TheSharpieOne/angular-validation-match.svg?branch=master)](https://travis-ci.org/TheSharpieOne/angular-validation-match)\n[![Code Climate](https://codeclimate.com/github/TheSharpieOne/angular-validation-match/badges/gpa.svg)](https://codeclimate.com/github/TheSharpieOne/angular-validation-match) [![Test Coverage](https://codeclimate.com/github/TheSharpieOne/angular-validation-match/badges/coverage.svg)](https://codeclimate.com/github/TheSharpieOne/angular-validation-match)\n[![Coverage Status](https://coveralls.io/repos/TheSharpieOne/angular-validation-match/badge.png)](https://coveralls.io/r/TheSharpieOne/angular-validation-match)\n[![Dependency Status](https://david-dm.org/thesharpieone/angular-validation-match.svg?style=flat)](https://david-dm.org/thesharpieone/angular-validation-match)\n[![devDependency Status](https://david-dm.org/thesharpieone/angular-validation-match/dev-status.svg?style=flat)](https://david-dm.org/thesharpieone/angular-validation-match#info=devDependencies)\n\nAngular Validation: Match\n===================\n\nChecks if one input matches another.  Useful for confirming passwords, emails, or anything.\n\nThe `match` attribute should be set equal to the ng-model value of the field to match.\n\n**Demo:** http://jsfiddle.net/TheSharpieOne/r6Ltru6c/\n\nInstallation\n------------\n\n`bower install angular-validation-match`\n\nThen add `validation.match` to your angular dependencies\n\n\u003csmall\u003e*Note: For angular 1.2 or lower use* `bower install angular-validation-match#1.3`\u003c/small\u003e\n\nAlso: `npm install angular-validation-match`\n\nUsage\n-----\n\n**Simple Property Example**\n\n```html\nPassword: \u003cinput ng-model=\"password\" type=\"password\" /\u003e\nConfirm: \u003cinput ng-model=\"passwordConfirm\" type=\"password\" match=\"password\" /\u003e\n```\n\n**Object Property Example**\n\n```html\nPassword: \u003cinput ng-model=\"user.password\" type=\"password\" /\u003e\nConfirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"user.password\" /\u003e\n```\n\n**Case insensitive (caseless) Example**\n\n```html\nPassword: \u003cinput ng-model=\"user.password\" type=\"password\" /\u003e\nConfirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"user.password\" match-caseless=\"true\" /\u003e\n```\n\u003csmall\u003e`match-caseless` can accept a scoped variable to allow the matching to be toggle-able between case insensitive and case sensitive. Default: false\u003c/small\u003e\n\n**Not Match Example**\u003cbr\u003e\nSometimes you want to ensure the values do *not* match, in that case you can use the `not-match` flag.\nThis also works in combination with `match-caseless` (if you want to not match case insensitively).\n```html\nPassword: \u003cinput ng-model=\"user.password\" type=\"password\" /\u003e\nConfirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"user.password\" not-match=\"true\" /\u003e\n```\n\u003csmall\u003e`not-match` can accept a scoped variable (`true`/`false`) to be toggle-able between matching and not matching. Default: false\u003c/small\u003e\n\n**Ignore empty Example**\n\n```html\nPassword: \u003cinput ng-model=\"user.password\" type=\"password\" /\u003e\nConfirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"user.password\" match-ignore-empty=\"true\" /\u003e\n```\n\u003csmall\u003e`match-ignore-empty` can accept a scoped variable to disable validating an empty input. Default: false\u003c/small\u003e\n\n**Display Custom Error**\u003cbr\u003e\nIf your form and field both are named, you can access the validation result to show/hide messages.\n\n```html\n\u003cform name=\"myForm\"\u003e\n      Password: \u003cinput ng-model=\"user.password\" type=\"password\" name=\"passwordName\" /\u003e\n      Confirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"user.password\" name=\"myConfirmField\" /\u003e\n      \u003cdiv ng-show=\"myForm.myConfirmField.$error.match\"\u003eFields do not match!\u003c/div\u003e\n\u003c/form\u003e\n```\n\n**Validate Against the `$viewValue` shown in the input**\u003cbr\u003e\nThe internal value (`$modelValue`) can differ from the external value (`$viewValue`) as appears in the input field shown to the user.  If your form and field both are named, you can validate against value displayed in the field, even if the field is invalid.\n\n```html\n\u003cform name=\"myForm\"\u003e\n    Password: \u003cinput ng-model=\"user.password\" type=\"password\" name=\"myPasswordField\" /\u003e\n    Confirm: \u003cinput ng-model=\"user.passwordConfirm\" type=\"password\" match=\"myForm.myPasswordField\" name=\"myConfirmField\" /\u003e\n\u003c/form\u003e\n```\n\u003csmall\u003eNote: `$viewValue`s are specific to fields/elements, not models.  Different fields with the same `ngModel` and have different `$viewValue`s.  Becuase of this, you need to use the form directive (assigning a `name` to a form tag) in combination with the specific field's name attribute to specific which field/element you want to match in particular.\u003c/small\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharpieone%2Fangular-validation-match","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesharpieone%2Fangular-validation-match","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesharpieone%2Fangular-validation-match/lists"}