{"id":23453652,"url":"https://github.com/the-moebius/ng-validators","last_synced_at":"2025-04-13T22:50:37.191Z","repository":{"id":38736631,"uuid":"91831499","full_name":"the-moebius/ng-validators","owner":"the-moebius","description":"Collection of input validators for Angular","archived":false,"fork":false,"pushed_at":"2022-12-10T08:23:36.000Z","size":805,"stargazers_count":34,"open_issues_count":16,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T18:55:09.909Z","etag":null,"topics":["angular","validators"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/the-moebius.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-05-19T17:50:07.000Z","updated_at":"2022-12-06T12:29:06.000Z","dependencies_parsed_at":"2023-01-26T04:46:41.181Z","dependency_job_id":null,"html_url":"https://github.com/the-moebius/ng-validators","commit_stats":null,"previous_names":["moebius-mlm/ng-validators"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-moebius%2Fng-validators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-moebius%2Fng-validators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-moebius%2Fng-validators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-moebius%2Fng-validators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-moebius","download_url":"https://codeload.github.com/the-moebius/ng-validators/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794559,"owners_count":21162614,"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","validators"],"created_at":"2024-12-24T02:19:10.709Z","updated_at":"2025-04-13T22:50:37.172Z","avatar_url":"https://github.com/the-moebius.png","language":"TypeScript","readme":"\n# @moebius/ng-validators\n\n[![npm version](https://badge.fury.io/js/%40moebius%2Fng-validators.svg)](https://badge.fury.io/js/%40moebius%2Fng-validators)\n\nThis repository contains a collection of useful Angular input validators,\nsome of which could also be used independently.\n\n\n## Installation\n\n`npm i -S @moebius/ng-validators`\n\n\n## Usage\n\n```typescript\nimport { birthDateValidator } from '@moebius/ng-validators';\n\nthis.form = this.formBuilder.group({\n  birthDate: [null, [\n    birthDateValidator({\n      minYearsOld: 18,\n      maxYearsOld: 60,\n    }),\n  ]],\n});\n```\n\n\n## Provided validators\n\n### Password\n\n`passwordValidator(options: PasswordValidatorOptions)`\n\nChecks if value is a correct password.\n\n* `options.minLength: number`\n* `options.maxLength: number`\n* `options.requireLetters: boolean`\n* `options.requireLowerCaseLetters: boolean`\n* `options.requireUpperCaseLetters: boolean`\n* `options.requireNumbers: boolean`\n* `options.requireSpecialCharacters: boolean`\n\n\n### Match Other\n\n`matchOtherValidator(otherControlName: string)`\n\nChecks if value equals to the value in another input.\nAlso, watched for events from another input to re-validate when necessary.\n\n* `otherControlName: string` — specify the name of another form control,\n  both controls must be in the same control group\n\n\n### Skype Name\n\n`skypeNameValidator()`\n\nChecks if value contains valid skype login name.\n\n\n### Birth Date\n\n`birthDateValidator(options: BirthDateValidatorOptions)`\n\nValidates the specified date of birth relative to the current date.\n\nThe date could be specified as native Date object, moment.js object\nor js-joda LocalDate.\n\n* `options.minYearsOld: number` — minimal years old, e.g. `18` (legal age)\n* `options.maxYearsOld: number` — maximum years old, e.g. `60` (pension age)\n\n\n## Support\n\nIf this library is useful to you, please add a star on [GitHub repository][repo-gh].\n\nThank you!\n\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2017—2019, MOEBIUS FOUNDATION, Slava Fomin II\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n  [repo-gh]: https://github.com/moebius-mlm/ng-validators\n  [js-joda]: https://js-joda.github.io/js-joda/index.html\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-moebius%2Fng-validators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-moebius%2Fng-validators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-moebius%2Fng-validators/lists"}