grunt-laravel-validator
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.
Getting Started
This plugin requires Grunt ~0.4.2
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
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "laravel_validator" task
Overview
In your project's Gruntfile, add a section named laravel_validator
to the data object passed into grunt.initConfig()
.
grunt
Usage Examples
All validator files
In this example all files from the "app/validators" folder will be converted and output to the "app/lib/Validators" directory.
grunt
Contributing
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.