Package Data | |
---|---|
Maintainer Username: | olivervogel |
Maintainer Contact: | oliver@intervention.io (Oliver Vogel) |
Package Create Date: | 2013-01-22 |
Package Last Update: | 2024-11-12 |
Home Page: | https://validation.intervention.io |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:07:09 |
Package Statistics | |
---|---|
Total Downloads: | 4,418,778 |
Monthly Downloads: | 115,274 |
Daily Downloads: | 4,805 |
Total Stars: | 589 |
Total Watchers: | 13 |
Total Forks: | 66 |
Total Open Issues: | 1 |
Intervention Validation is an extension library for Laravel's own validation system. The package adds rules to validate data like IBAN, BIC, ISBN, creditcard numbers and more.
You can install this package quick and easy with Composer.
Require the package via Composer:
$ composer require intervention/validation
The Validation class is built to work with the Laravel Framework. The integration is done in seconds.
Open your Laravel config file config/app.php
and add service provider in the $providers
array:
'providers' => array(
...
'Intervention\Validation\ValidationServiceProvider'
),
If you use Laravel 5.5+, then you may skip this step as Laravel's Package Auto-Discovery will include this package automatically.
The installed package provides the following additional validation rules
including their error messages.
Checks for a valid Business Identifier Code (BIC).
Checks for a valid International Bank Account Number (IBAN).
Checks for a valid International Securities Identification Number (ISIN).
The given field must be a valid creditcard number.
The field under validation must be a valid hexadecimal color code.
The field under validation must be a valid International Standard Book Number (ISBN).
The field under validation must be a valid date in ISO 8601 format.
The field under validation must be a valid username with a minimum of 3 characters and maximum of 20 characters. Consisting of alpha-numeric characters, underscores and starting with a alphabetic character.
The field under validation must be free of any html code.
Checks for valid password with a minimum of 6 characters and maximum of 64 characters, containing at least one digit, one upper case letter, one lower case letter and one special symbol.
The field under validation must contain only alphabetic characters and spaces.
The given field must be a well formed domainname.
Either the field under validation must be empty, or all of the other specified fields.
Add the corresponding key to /resources/lang/<language>/validation.php
like this:
// example
'iban' => 'Please enter IBAN number!',
Or add your custom messages directly to the validator like described in the docs.
Intervention Validation Class is licensed under the MIT License.