{"id":26322997,"url":"https://github.com/devlop/secure-password-rule","last_synced_at":"2026-05-20T09:11:35.202Z","repository":{"id":56966815,"uuid":"336628068","full_name":"devlop/secure-password-rule","owner":"devlop","description":"Extendable password validation rule for Laravel","archived":false,"fork":false,"pushed_at":"2021-03-05T08:36:18.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T14:09:01.244Z","etag":null,"topics":["laravel","validation","validation-rule"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/devlop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-06T20:18:39.000Z","updated_at":"2021-03-05T08:35:59.000Z","dependencies_parsed_at":"2022-08-21T06:10:21.068Z","dependency_job_id":null,"html_url":"https://github.com/devlop/secure-password-rule","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/devlop/secure-password-rule","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlop%2Fsecure-password-rule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlop%2Fsecure-password-rule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlop%2Fsecure-password-rule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlop%2Fsecure-password-rule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlop","download_url":"https://codeload.github.com/devlop/secure-password-rule/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlop%2Fsecure-password-rule/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33253229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-20T04:48:54.280Z","status":"ssl_error","status_checked_at":"2026-05-20T04:48:10.851Z","response_time":356,"last_error":"SSL_read: 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":["laravel","validation","validation-rule"],"created_at":"2025-03-15T17:16:07.195Z","updated_at":"2026-05-20T09:11:35.187Z","avatar_url":"https://github.com/devlop.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/devlop/secure-password-rule\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/devlop/secure-password-rule\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/devlop/secure-password-rule/blob/master/LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/devlop/secure-password-rule\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# SecurePasswordRule\n\nAn extendable password validation rule for Laravel to make it easy to have the same password requirements across the whole system.\n\nThe initial settings are very permissive and pretty much only checks the length of the password, see ```Configuration``` for how to\nchange it for your needs.\n\n# Installation\n\n```bash\ncomposer require devlop/secure-password-rule\n```\n\n# Usage\n\nAdd it to the ```rules``` of a ```FormRequest```\n\n```php\nnamespace App\\Http\\Requests;\n\nuse Devlop\\SecurePasswordRule\\SecurePasswordRule;\nuse Illuminate\\Foundation\\Http\\FormRequest;\n\nclass ChangePasswordRequest extends FormRequest\n{\n    /**\n     * Get the validation rules that apply to the request.\n     *\n     * @return array\n     */\n    public function rules()\n    {\n        return [\n            'new_password' =\u003e [\n                'required',\n                'string',\n                new SecurePasswordRule,\n            ],\n        ];\n    }\n}\n```\n\n# Configuration\n\nThe class is open for extension and does not accept any arguments when instantiating since that would open the possibility of\nending up with different password requirements in different parts of your system.\n\nThe recommended way is to create your own sub class of SecurePasswordRule and change the parameters you wish to change, and then\nreference that sub class instead in your FormRequests.\n\n```php\nnamespace App\\Rules;\n\nuse Devlop\\SecurePasswordRule\\SecurePasswordRule as BaseSecurePasswordRule;\n\nclass SecurePasswordRule extends BaseSecurePasswordRule\n{\n    /**\n     * Require the use of X special characters\n     */\n    protected int $requireSpecial = 10;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlop%2Fsecure-password-rule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlop%2Fsecure-password-rule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlop%2Fsecure-password-rule/lists"}