{"id":16085760,"url":"https://github.com/infinitypaul/quest","last_synced_at":"2025-04-05T13:42:25.053Z","repository":{"id":41301683,"uuid":"509094492","full_name":"infinitypaul/quest","owner":"infinitypaul","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-30T13:54:59.000Z","size":215,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T09:50:20.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/infinitypaul.png","metadata":{"files":{"readme":"readMe.md","changelog":null,"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":"2022-06-30T13:35:58.000Z","updated_at":"2022-11-22T21:39:12.000Z","dependencies_parsed_at":"2022-08-28T07:10:57.996Z","dependency_job_id":null,"html_url":"https://github.com/infinitypaul/quest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fquest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fquest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fquest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/infinitypaul%2Fquest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/infinitypaul","download_url":"https://codeload.github.com/infinitypaul/quest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345722,"owners_count":20924098,"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":[],"created_at":"2024-10-09T13:09:17.839Z","updated_at":"2025-04-05T13:42:25.028Z","avatar_url":"https://github.com/infinitypaul.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Tech Stack\n\n* PHP\n* Composer\n\n## Download Instruction\n\n1. Clone the project.\n\n```\ngit clone https://github.com/infinitypaul/quest.git projectname\n```\n\n\n2. Install dependencies via composer.\n\n```\ncomposer install \n```\n\n4. Run php server.\n\n```\nphp -S localhost:8000\n```\n\n5. Sample Response\n\n![img.png](img.png)\n\n7. Sample Code \n\n```php\n$check = new \\App\\Checkers\\Check([\n    'name' =\u003e '',\n    'email' =\u003e [\n        'infinitypaul@live.com',\n        '',\n        'ade',\n        'ade@google.com'\n    ],\n    'password' =\u003e 'eeee'\n]);\n\n$check-\u003esetRules([\n    'name' =\u003e [\n        'required'\n    ],\n    'email.*' =\u003e [\n        new \\App\\Checkers\\Rules\\Required(),\n        'email',\n        'blacklist'\n    ],\n    'password' =\u003e [\n        'min:5',\n        'sequence'\n    ]\n]);\n\n\nif(!$check-\u003evalidate()){\n    dump($check-\u003egetErrors());\n} else {\n    dump(\"passed\");\n};\n```\nYou can either define your rules as a class\n```php\nnew \\App\\Checkers\\Rules\\Required(),\n```\n\nor as a string\n\n```phpregexp\nrequired\n```\n\nyou can also define your own rule by extending the Rule Class\n\n```php\nclass EmailRule extends Rule\n{\n\n    /**\n     * @param $field\n     * @param $value\n     * @return bool\n     */\n    public function passes($field, $value): bool\n    {\n        return filter_var($value, FILTER_VALIDATE_EMAIL);\n    }\n\n    /**\n     * @param $field\n     * @return string\n     */\n    public function message($field): string\n    {\n        return ucwords($field. ' Must Be A Valid Email Address');\n    }\n}\n```\n\nIf you prefer it to br string base, you can define it in the RuleMap.php\n\n```php\n'email' =\u003e EmailRule::class\n```\n\n\n\n\n###Organization Password Policy\n\nThe service is very flexible, and new rules can be added without much code.\n\nWhat is needed is to create a new rule, extend the RULE class, and define all your conditions and organization password policy like the one below \n\n* Password/Passphrase Length Policy\n* Password Deny List\n* Password Combination\n* Password Checks to be sure it isn't part of the leaked password\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Fquest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfinitypaul%2Fquest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfinitypaul%2Fquest/lists"}