gulp-laravel-validator
v1.0.3
Published
Generate PHP validations from short and concise descriptions of the input format.
Downloads
1
Maintainers
Readme
gulp-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.
Installation
Install via npm:
npm install gulp-laravel-validator --save-dev
Example
var gulp = require('gulp'),
laravelValidator = require('gulp-laravel-validator'),
rename = require('gulp-rename');
gulp.task('default', function() {
return gulp.src('app/validators/**/*.js')
.pipe(laravelValidator())
.pipe(rename({extname: '.php'}))
.pipe(gulp.dest('app/lib/Validators'));
});
For this example to work you'll need to install gulp-rename.