{"id":22283053,"url":"https://github.com/bitcodr/jsonschema-request","last_synced_at":"2025-03-25T19:47:07.752Z","repository":{"id":56947077,"uuid":"133721623","full_name":"bitcodr/jsonschema-request","owner":"bitcodr","description":"Laravel Server side form validation using JSON Schema  . ","archived":false,"fork":false,"pushed_at":"2018-06-28T15:00:56.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T17:38:51.384Z","etag":null,"topics":["json","json-schema","jsonschema","jsonschema-request","laravel","schema","validation"],"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/bitcodr.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":"2018-05-16T20:51:05.000Z","updated_at":"2019-05-25T19:44:22.000Z","dependencies_parsed_at":"2022-08-21T02:40:27.085Z","dependency_job_id":null,"html_url":"https://github.com/bitcodr/jsonschema-request","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/bitcodr%2Fjsonschema-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fjsonschema-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fjsonschema-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitcodr%2Fjsonschema-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitcodr","download_url":"https://codeload.github.com/bitcodr/jsonschema-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245535009,"owners_count":20631289,"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":["json","json-schema","jsonschema","jsonschema-request","laravel","schema","validation"],"created_at":"2024-12-03T16:38:25.386Z","updated_at":"2025-03-25T19:47:07.731Z","avatar_url":"https://github.com/bitcodr.png","language":"PHP","readme":"# laravel-jsonschema-request\nLaravel Server side form validation using JSON Schema\n\n## Install\n    composer require amiralii/jsonschema-request\n\n## How to use\n1. Create a form request class as you would with artisan: php artisan make:request PersonRequest\n2. Change the extended class in PersonRequest to use SchemaRequest/SchemaFormRequest\n3. Implement the rules() method to return a JSON Schema string\n\nExample\n```\n\u003c?php\n\nnamespace App\\Http\\Requests;\n\nuse SchemaRequest\\SchemaFormRequest as Request;\n\nclass PersonFormRequest extends Request\n{\n\n    /**\n     * Determine if the user is authorized to make this request.\n     *\n     * @return bool\n     */\n    public function authorize()\n    {\n        return true;\n    }\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            \"type\": \"object\",\n            \"properties\": {\n                \"fname\": {\"type\": \"string\", \"maximum\": 5},\n                \"lname\": {\"type\": \"string\", \"minimum\": 5},\n                \"mname\": {\"type\": \"string\", \"minimum\": 5},\n                \"age\": {\"type\": \"integer\", \"minimum\": 21},\n                \"email\": {\"type\": \"string\", \"format\": \"email\"}\n            }\n        }';\n    }\n}\n\n```\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcodr%2Fjsonschema-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitcodr%2Fjsonschema-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitcodr%2Fjsonschema-request/lists"}