Generate PHP validations from short and concise descriptions of the input format.
NOTE: This project is not related to the Laravel official Validator class. It's a stricter and statically generated alternative to it.
To read more about the format of the validator files see the laravel-validator project directly.
This plugin requires Grunt
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-laravel-validator --save-dev
The "laravel_validator" task
In your project's Gruntfile, add a section named
laravel_validator to the data object passed into
All validator files
In this example all files from the "app/validators" folder will be converted and output to the "app/lib/Validators" directory.
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.