2017 © Pedro Peláez
 

library laravel-number-validation

Adds new validation rules for comparing the value of integers and floats

image

effectdigital/laravel-number-validation

Adds new validation rules for comparing the value of integers and floats

  • Friday, August 26, 2016
  • by effectdigital
  • Repository
  • 0 Watchers
  • 0 Stars
  • 21 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Laravel Number Validation

To get started, install the package through composer;, (*1)

composer require effectdigital/laravel-number-validation, (*2)

Now register the service provider in your config/app.php, (*3)

EffectDigital\LaravelNumberValidation\ValidatorServiceProvider::class,, (*4)

Lastly, create the validation messages for the new rules by adding the following lines to resources/lang/en/validation.php, (*5)

'gte' => 'The :attribute must be greater-than or equal to :other',
'gt'  => 'The :attribute must be greater-than :other',
'lte' => 'The :attribute must be less-than or equal to :other',
'lt'  => 'The :attribute must be less-than :other',

Example Usage

[
    'range_start' => 'required|integer',
    'range_end' => 'required|integer|gte:range_start',
]

// OR

[
    'days' => 'required|integer|lte:7',
]

The Versions

26/08 2016

dev-master

9999999-dev

Adds new validation rules for comparing the value of integers and floats

  Sources   Download

MIT

The Requires

 

by Jared

26/08 2016

v1.0

1.0.0.0

Adds new validation rules for comparing the value of integers and floats

  Sources   Download

MIT

The Requires

 

by Jared