2017 © Pedro Peláez
 

library validation

Extra functionality for Laravel 4 Validator.

image

cohensive/validation

Extra functionality for Laravel 4 Validator.

  • Tuesday, April 5, 2016
  • by KaneCohen
  • Repository
  • 1 Watchers
  • 14 Stars
  • 10,567 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 9 Versions
  • 1 % Grown

The README.md

Extended Laravel Validation

This class extends Laravel Validation package changing some basic functionality to provide validation of data with wildcards. How do wildcrads work:, (*1)

wildcrads, (*2)

Installation

Add following line to your composer.json file:, (*3)

For Laravel 4.x, (*4)

"cohensive/validation": "4.1.*"

For Laravel 5.x, (*5)

"cohensive/validation": "5.0.*"

Then run composer install or composer update to download it and autoload., (*6)

Once package is installed you need to register it as a service provider. Find app.php file in your config deirectory. First, since this package extends default Validation, you need to comment out or remove this line from providers array: 'Illuminate\Validation\ValidationServiceProvider'., (*7)

Now in the same providers array you need to add new package:, (*8)

'providers' => array(

    //...
    'Cohensive\Validation\ValidationServiceProvider',
    //...

)

No need to add anything in aliases., (*9)

Usage

Mostly the same as in core Validation. When it comes to validation with wildcrads here's an example:, (*10)


$input = array('input' => array('foo', 'bar', 'baz')); $rules = array( 'input:*' => 'Alpha|Min:3' ); $v = Validator::make($input, $rules);

Shall we go deeper?, (*11)


$input = array('users' => array( 0 => array( 'name' => 'Mike', 'age' => 30 ), 1 => array( 'name' => 'Rob', 'age' => '28' ) )); $rules = array( 'users:*:name' => 'Alpha|Min:3', 'users:*:age' => 'Numeric|Min:18|Max:80' ); $v = Validator::make($input, $rules);

The Versions

05/04 2016

4.1.x-dev

4.1.9999999.9999999-dev

Extra functionality for Laravel 4 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

16/02 2015

5.0.x-dev

5.0.9999999.9999999-dev

Extra functionality for Laravel 5 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

16/02 2015

dev-master

9999999-dev

Extra functionality for Laravel 5 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

16/02 2015

v5.0.0

5.0.0.0

Extra functionality for Laravel 4 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

25/11 2013

4.0.x-dev

4.0.9999999.9999999-dev

Extra functionality for Laravel 4 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

25/11 2013

4.0.0

4.0.0.0

Extra functionality for Laravel 4 Validator.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

laravel validation

13/08 2013

1.0.2

1.0.2.0

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

13/08 2013

1.0.1

1.0.1.0

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen

13/08 2013

1.0.0

1.0.0.0

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Kane Cohen