penance316/laravel-base64-validator
laravel base64 validation package
37,578
4
| Install | |
|---|---|
composer require penance316/laravel-base64-validator |
|
| Latest Version: | v1.0 |
| PHP: | >=5.4.0 |
| License: | MIT |
| Last Updated: | Jan 18, 2018 |
| Links: | GitHub · Packagist |
Maintainer: penance316
Laravel Base64 Validator
Install
composer require "penance316/laravel-base64-validator"
Add the required validator to boot method of app/Providers/AppServiceProvider.php
Validator::extend('base64', 'Penance316\Validators\Base64Validator@validateBase64');
Add the following lines to resources/lang/en/validation.php
'base64' => 'The :attribute must be a valid Base64 string.',
Use like other validators
...
'reference' => 'required|max:255',
'data' => 'required|base64',
'email' => 'required|email',
...
Test
Use vendor phpunit
./vendor/phpunit/phpunit/phpunit --testdox
Related Packages
tylercd100/laravel-validator-color
Validate that a certain value is a valid CSS color string in Laravel 5
81,613
15
ellisio/laravel-phone
A phone validator for Laravel using the free Twilio phone lookup service.
29,983
11
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v1.0 | >=5.4.0 | >=5.0.0 | MIT |