{"id":14985414,"url":"https://github.com/tarkhov/eloquent-validation","last_synced_at":"2025-04-11T19:40:28.870Z","repository":{"id":53488700,"uuid":"144512444","full_name":"tarkhov/eloquent-validation","owner":"tarkhov","description":"Laravel Eloquent model validation rules.","archived":false,"fork":false,"pushed_at":"2022-01-13T00:27:09.000Z","size":21,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T15:33:44.284Z","etag":null,"topics":["composer","database","db","eloquent","laravel","orm","php","validation"],"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/tarkhov.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":"2018-08-13T00:54:52.000Z","updated_at":"2021-11-16T11:06:39.000Z","dependencies_parsed_at":"2022-08-18T08:11:32.377Z","dependency_job_id":null,"html_url":"https://github.com/tarkhov/eloquent-validation","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarkhov%2Feloquent-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarkhov","download_url":"https://codeload.github.com/tarkhov/eloquent-validation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248468201,"owners_count":21108775,"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":["composer","database","db","eloquent","laravel","orm","php","validation"],"created_at":"2024-09-24T14:10:56.260Z","updated_at":"2025-04-11T19:40:28.842Z","avatar_url":"https://github.com/tarkhov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eloquent validation\n\nLaravel eloquent model validation rules.\n\n### Contents\n\n1. [Compatibility](#compatibility)\n2. [Installation](#installation)\n   1. [Composer](#composer)\n3. [Usage](#usage)\n   1. [Model rules](#model-rules)\n   2. [Model form request](#model-form-request)\n4. [Author](#author)\n5. [License](#license)\n\n## Compatibility\n\nLibrary | Version\n------- | -------\nLaravel | \u003e=5.5\n\n## Installation\n\n### Composer\n\n```bash\ncomposer require tarkhov/eloquent-validation\n```\n\n## Usage\n\n### Model rules\n\n```php\n\u003c?php\nnamespace App;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse EloquentValidation\\Database\\Eloquent\\ModelRules;\n\nclass Page extends Model implements ModelRules\n{\n    protected $fillable = [\n        'is_active',\n        'slug',\n        'name',\n        'description',\n        'image',\n        'title',\n        'meta_description',\n        'meta_keywords',\n    ];\n\n    public static function rules()\n    {\n        return [\n            'id'               =\u003e 'required|integer',\n            'is_active'        =\u003e 'boolean',\n            'slug'             =\u003e 'required|string|max:255',\n            'name'             =\u003e 'required|string|max:255',\n            'description'      =\u003e 'required|string|max:65535',\n            'image'            =\u003e 'nullable|string|max:255',\n            'title'            =\u003e 'required|string|max:255',\n            'meta_description' =\u003e 'required|string|max:255',\n            'meta_keywords'    =\u003e 'required|string|max:255',\n        ];\n    }\n}\n```\n\n### Model form request\n\n```php\n\u003c?php\nnamespace App\\Http\\Requests;\n\nuse EloquentValidation\\Foundation\\Http\\CreateFormRequest;\nuse App\\Page;\n\nclass CreatePage extends CreateFormRequest\n{\n    protected $model = 'Page';\n}\n```\n\n## Author\n\n**Alexander Tarkhov**\n\n* [Facebook](https://www.facebook.com/alex.tarkhov)\n* [Twitter](https://twitter.com/alextarkhov)\n* [Medium](https://medium.com/@tarkhov)\n* [LinkedIn](https://www.linkedin.com/in/tarkhov/)\n\n## License\n\nThis project is licensed under the **MIT License** - see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkhov%2Feloquent-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarkhov%2Feloquent-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarkhov%2Feloquent-validation/lists"}