gulp-laravel-validator

1.0.3 • Public • Published

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.

Package Sidebar

Install

npm i gulp-laravel-validator

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ernestoalejo