{"id":24721859,"url":"https://github.com/seferov/requestvalidatorbundle","last_synced_at":"2025-07-02T14:08:12.785Z","repository":{"id":9238257,"uuid":"61352228","full_name":"seferov/RequestValidatorBundle","owner":"seferov","description":"Symfony Validator Request params with annotations","archived":false,"fork":false,"pushed_at":"2022-01-12T08:37:23.000Z","size":38,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-27T12:14:33.506Z","etag":null,"topics":["bundle","php","symfony","symfony-bundle"],"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/seferov.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":"2016-06-17T06:52:07.000Z","updated_at":"2022-02-17T20:13:07.000Z","dependencies_parsed_at":"2022-08-07T05:00:45.436Z","dependency_job_id":null,"html_url":"https://github.com/seferov/RequestValidatorBundle","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seferov%2FRequestValidatorBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seferov%2FRequestValidatorBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seferov%2FRequestValidatorBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seferov%2FRequestValidatorBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seferov","download_url":"https://codeload.github.com/seferov/RequestValidatorBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235847529,"owners_count":19054537,"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":["bundle","php","symfony","symfony-bundle"],"created_at":"2025-01-27T12:14:39.216Z","updated_at":"2025-01-27T12:14:42.297Z","avatar_url":"https://github.com/seferov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Symfony RequestValidatorBundle\n==============================\n\n[![Build Status](https://travis-ci.org/seferov/RequestValidatorBundle.svg?branch=master)](https://travis-ci.org/seferov/RequestValidatorBundle)\n\n# Usage\n\n```php\n\u003c?php\n\nnamespace AppBundle\\Controller;\n\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller;\nuse Symfony\\Component\\Validator\\Constraints as Assert;\nuse Seferov\\RequestValidatorBundle\\Validator\\RequestValidator;\nuse Seferov\\RequestValidatorBundle\\Annotation\\Validator;\n\nclass AcmeController extends Controller\n{\n    /**\n     * @Validator(name=\"page\", default=\"1\", constraints={@Assert\\Type(type=\"numeric\"), @Assert\\Range(min=1)})\n     * @Validator(name=\"limit\", default=\"25\", constraints={@Assert\\Type(type=\"numeric\"), @Assert\\Range(min=10, max=100)})\n     * @Validator(name=\"order\", default=\"desc\", constraints={@Assert\\Choice(choices={\"asc\", \"desc\"}, message=\"error.wrong_order_choice\")})\n     * @Validator(name=\"name\", constraints={@Assert\\NotBlank()})\n     * @Validator(name=\"email\", required=true, constraints={@Assert\\Email()})\n     *\n     * @param RequestValidator $requestValidator\n     */\n    public function someAction(RequestValidator $requestValidator)\n    {\n        // You can get errors if there is any\n        /** @var \\Symfony\\Component\\Validator\\ConstraintViolationList $errors */\n        $errors = $requestValidator-\u003egetErrors();\n        \n        // You can get the request value with `get($path)` method\n        $email = $requestValidator-\u003eget('email');\n         \n        // ...\n    }\n}\n\n```\n\n# Installation\n\nStep 1: Download the Bundle\n---------------------------\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n```bash\n$ composer require seferov/request-validator-bundle\n```\n\nThis command requires you to have Composer installed globally, as explained\nin the [installation chapter](https://getcomposer.org/doc/00-intro.md) of the Composer documentation.\n\nStep 2: Enable the Bundle\n-------------------------\n\nThen, enable the bundle by adding it to the list of registered bundles\nin the `app/AppKernel.php` file of your project:\n\n```php\n\u003c?php\n// app/AppKernel.php\n\n// ...\nclass AppKernel extends Kernel\n{\n    public function registerBundles()\n    {\n        $bundles = array(\n            // ...\n\n            new Seferov\\RequestValidatorBundle\\SeferovRequestValidatorBundle(),\n        );\n\n        // ...\n    }\n\n    // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseferov%2Frequestvalidatorbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseferov%2Frequestvalidatorbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseferov%2Frequestvalidatorbundle/lists"}