{"id":23092990,"url":"https://github.com/crispengari/regex-validator","last_synced_at":"2025-04-03T18:44:42.021Z","repository":{"id":57104444,"uuid":"398628048","full_name":"CrispenGari/regex-validator","owner":"CrispenGari","description":"this is a javascript package that validate the validity of common strings. It check if the basic strings like email, password, username are valid.","archived":false,"fork":false,"pushed_at":"2023-02-27T07:21:38.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T17:02:42.976Z","etag":null,"topics":["javascript","regular-expression","typescript","validations","validator"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CrispenGari.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":"2021-08-21T18:16:33.000Z","updated_at":"2023-04-05T06:24:21.000Z","dependencies_parsed_at":"2024-12-16T21:48:53.894Z","dependency_job_id":"f7cbb334-5d76-4131-988a-539916de02b4","html_url":"https://github.com/CrispenGari/regex-validator","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"a94a84577a3342f74adcd318263cf2f3b2014102"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fregex-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fregex-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fregex-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CrispenGari%2Fregex-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CrispenGari","download_url":"https://codeload.github.com/CrispenGari/regex-validator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247061215,"owners_count":20877166,"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","regular-expression","typescript","validations","validator"],"created_at":"2024-12-16T21:46:11.244Z","updated_at":"2025-04-03T18:44:41.983Z","avatar_url":"https://github.com/CrispenGari.png","language":"TypeScript","readme":"### Regex Valiador.\n\nThis is a package that validate basic strings using regular expressions. This package is used to validate strings like passwords, username, phone-numbers or and email.\n\n### Installation\n\n### yarn\n\n```\nyarn add @crispengari/regex-validator\n```\n\n### npm\n\n```\nnpm install @crispengari/regex-validator\n```\n\n### TypeScript\n\nYou don't have to explicitly install the types for this package because it was created using typescript.\n\n### Basic usage\n\n```ts\nimport {\n  isValidEmail,\n  isValidUsername,\n  isValidPhoneNumber,\n  isValidPassword,\n} from \"@crispengari/regex-validator\";\n\nconsole.log(isValidEmail(\"test@gmail.com\")); // true\nconsole.log(isValidUsername(\"username_9\")); // true\nconsole.log(isValidPhoneNumber(\"+98 778 901 7890\")); // true\nconsole.log(isValidPassword(\"this_is9t@\")); // true\n```\n\n### Password `salts`.\n\nWe have some 3 basic password `salts` that we can validate which are:\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eSalt\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n      \u003cth\u003eValue\u003c/th\u003e\n      \u003cth\u003eIs Default\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eM8L1D1\u003c/td\u003e\n      \u003ctd\u003eMinimum eight characters, at least one letter and one number\u003c/td\u003e\n      \u003ctd\u003e\"M8L1D1\"\u003c/td\u003e\n      \u003ctd\u003etrue\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eM8L1D1S1\u003c/td\u003e\n      \u003ctd\u003e\n        Minimum eight characters, at least one letter, one number and one\n        special character\n      \u003c/td\u003e\n      \u003ctd\u003e\"M8L1D1S1\"\u003c/td\u003e\n      \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003eM8L1U1D1S1\u003c/td\u003e\n      \u003ctd\u003e\n        Minimum eight characters, at least one uppercase letter, one lowercase\n        letter and one number\n      \u003c/td\u003e\n      \u003ctd\u003e\"M8L1U1D1S1\"\u003c/td\u003e\n      \u003ctd\u003efalse\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Changing the password `salt` to validate.\n\nYou can change the password salt easily by passing the following the salt as the second argument to the ``:\n\n```ts\nimport { isValidPassword } from \"@crispengari/regex-validator\";\n\nconsole.log(isValidPassword(\"this_is9t@\", passwordSalts.M8L1D1));\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fregex-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrispengari%2Fregex-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrispengari%2Fregex-validator/lists"}