{"id":36988036,"url":"https://github.com/pragaonj/laminas-password-validator","last_synced_at":"2026-01-13T23:24:12.737Z","repository":{"id":57044315,"uuid":"445469265","full_name":"pragaonj/laminas-password-validator","owner":"pragaonj","description":"laminas-password-validator provides a validator for character-set based input validation.","archived":false,"fork":false,"pushed_at":"2022-01-07T11:35:15.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T22:41:41.950Z","etag":null,"topics":["laminas","laminas-validator","password-validator","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pragaonj.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":"2022-01-07T09:38:00.000Z","updated_at":"2022-03-08T14:52:04.000Z","dependencies_parsed_at":"2022-08-23T23:31:07.259Z","dependency_job_id":null,"html_url":"https://github.com/pragaonj/laminas-password-validator","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pragaonj/laminas-password-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragaonj%2Flaminas-password-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragaonj%2Flaminas-password-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragaonj%2Flaminas-password-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragaonj%2Flaminas-password-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pragaonj","download_url":"https://codeload.github.com/pragaonj/laminas-password-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pragaonj%2Flaminas-password-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["laminas","laminas-validator","password-validator","php"],"created_at":"2026-01-13T23:24:12.021Z","updated_at":"2026-01-13T23:24:12.729Z","avatar_url":"https://github.com/pragaonj.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# laminas-password-validator\n\nlaminas-password-validator provides a validator for character-set based input validation.\n\n## Installation\n\n`composer require pragaonj/laminas-password-validator`\n\n## Usage\n\nThe password validator implements laminas `Laminas\\Validator\\ValidatorInterface` and can be used like every other laminas validator. The validator requires two options:\n\n- `characterSets`\n  contains an array of considered character-sets (possible values are: _DIGIT, LETTER, CAPITAL_LETTER, SPECIAL_CHARACTER_)\n- `numberOfRequiredCharacterSets`\n  the number of considered character-sets that need to be present in the password.\n\n### General usage\n\n```php\nuse Pragaonj\\Validator\\PasswordValidator;\n\n$validator = new PasswordValidator([\n    \"characterSets\" =\u003e \n    [\n        PasswordValidator::SPECIAL_CHARACTER,\n        PasswordValidator::LETTER,\n        PasswordValidator::CAPITAL_LETTER,\n        PasswordValidator::DIGIT,\n    ],\n    \"numberOfRequiredCharacterSets\" =\u003e 4, // requires all 4 character-sets to be present in the password\n]);\n\n$valid = $validator-\u003eisValid(\"myInsecurePassword\");\n\n$messages = $validator-\u003egetMessages();\n```\n\nTo overwrite the default error message you can set the messageTemplate for `msgNotEnoughCharacterSets`.\n\n```php\nuse Pragaonj\\Validator\\PasswordValidator;\n\n$validator = new PasswordValidator([\n    \"characterSets\" =\u003e \n    [\n        PasswordValidator::SPECIAL_CHARACTER,\n        PasswordValidator::LETTER,\n        PasswordValidator::CAPITAL_LETTER,\n        PasswordValidator::DIGIT,\n    ],\n    \"numberOfRequiredCharacterSets\" =\u003e 3,\n    \"messageTemplates\" =\u003e [\n        PasswordValidator::MSG_NOTENOUGHCHARACTARSETS =\u003e \"my custom error message\"\n    ]\n]);\n\n$valid = $validator-\u003eisValid(\"myInsecurePassword\");\n\n$messages = $validator-\u003egetMessages();\n// will return [\"msgNotEnoughCharacterSets\" =\u003e \"my custom error message\"]\n```\n\n### Usage in laminas-mvc application\n\nTo use the validator in a laminas-mvc application register it as invokable in your `module.config.php`.\n\n```php\nuse Pragaonj\\Validator\\PasswordValidator;\n\nreturn [\n  'validators' =\u003e [\n    'invokables' =\u003e [\n        PasswordValidator::class,\n    ],\n    \"aliases\" =\u003e [\n        \"PasswordValidator\" =\u003e PasswordValidator::class,\n    ]\n  ],\n];\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpragaonj%2Flaminas-password-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpragaonj%2Flaminas-password-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpragaonj%2Flaminas-password-validator/lists"}