digitonic/validation

A Laravel custom validation package with some out of the box validators.

3.0.0 2022-07-27 13:42 UTC

README

Latest Version on Packagist Build Status Scrutinizer Code Quality Total Downloads

This package will provide some custom validation out of the box in one single package. Using a configuration, you may create your own custom validations.

Installation

You can install the package via composer:

$ composer require digitonic/validation 

Publish the config

$ php artisan vendor:publish --provider="Digitonic\Validation\ValidationServiceProvider"

Validators keys

Allowed Recipients

This validator will check for the validity of a given mobile phone number in a configured country.

allowed_recipients
CSV

This validator will check the contents of a given CSV has at least one valid row.

csv
Phone Number Index

This validator will check the contents of a passed CSV file for a given key and validate that this value is a valid mobile phone number within a configured country.

phone_number_index

Password Validation

Check to ensure a validated string contains one or more uppercase characters.

has_uppercase

Check to ensure a validated string contains one or more lowercase characters.

has_lowercase

Check to ensure a validated string contains one or more numeric characters.

has_numeric

Check to ensure a validated string contains one or more special characters.

has_special

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email steven@digitonic.co.uk instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.