{"id":20314836,"url":"https://github.com/solar05/php-oop-project-lvl1","last_synced_at":"2026-06-08T15:32:00.773Z","repository":{"id":107158384,"uuid":"334256740","full_name":"solar05/php-oop-project-lvl1","owner":"solar05","description":"Php library that validates data, check readme for use cases.","archived":false,"fork":false,"pushed_at":"2022-01-02T11:08:27.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T08:45:46.074Z","etag":null,"topics":["library","oop","php","validation","validator"],"latest_commit_sha":null,"homepage":"","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/solar05.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-29T20:33:08.000Z","updated_at":"2022-01-02T11:08:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"31ad9382-9ba4-4cb1-bc2f-4c95efb6a19f","html_url":"https://github.com/solar05/php-oop-project-lvl1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solar05/php-oop-project-lvl1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fphp-oop-project-lvl1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fphp-oop-project-lvl1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fphp-oop-project-lvl1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fphp-oop-project-lvl1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solar05","download_url":"https://codeload.github.com/solar05/php-oop-project-lvl1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solar05%2Fphp-oop-project-lvl1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["library","oop","php","validation","validator"],"created_at":"2024-11-14T18:16:57.064Z","updated_at":"2026-06-08T15:32:00.741Z","avatar_url":"https://github.com/solar05.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Hexlet tests and linter status:\n[![Actions Status](https://github.com/solar05/php-oop-project-lvl1/workflows/hexlet-check/badge.svg)](https://github.com/solar05/php-oop-project-lvl1/actions)\n\n## Description;\nPHP library for validation.\n\n## Usage example:\n```PHP\n\u003c?php\nuse Hexlet\\Validator\\Validator;\n\n$v = new \\Hexlet\\Validator\\Validator();\n\n// strings\n$schema = $v-\u003erequired()-\u003estring();\n\n$schema-\u003eisValid('what does the fox say'); // true\n$schema-\u003eisValid(''); // false\n\n// numbers\n$schema = $v-\u003erequired()-\u003enumber()-\u003epositive();\n\n$schema-\u003eisValid(-10); // false\n$schema-\u003eisValid(10); // true\n\n// array with checking support\n$schema = $v-\u003earray()-\u003esizeof(2)-\u003eshape([\n    'name' =\u003e $v-\u003estring()-\u003erequired(),\n    'age' =\u003e $v-\u003enumber()-\u003epositive(),\n]);\n\n$schema-\u003eisValid(['name' =\u003e 'kolya', 'age' =\u003e 100]); // true\n$schema-\u003eisValid(['name' =\u003e '', 'age' =\u003e null]); // false\n\n// New validator adding\n$fn = fn($value, $start) =\u003e str_starts_with($value, $start);\n$v-\u003eaddValidator('string', 'startWith', $fn);\n\n$schema = $v-\u003estring()-\u003etest('startWith', 'H');\n\n$schema-\u003eisValid('exlet'); // false\n$schema-\u003eisValid('Hexlet'); // true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolar05%2Fphp-oop-project-lvl1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolar05%2Fphp-oop-project-lvl1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolar05%2Fphp-oop-project-lvl1/lists"}