langleyfoxall / laravel-validation-rules
A set of commonly used validation rules, such as UK Postcodes, Phone numbers and more.
v1.0.0
2018-10-30 14:37 UTC
Requires
- php: >=7.1
- illuminate/contracts: ^5.1
This package is auto-updated.
Last update: 2024-10-29 05:46:39 UTC
README
A set of commonly used validation rules, such as UK Postcodes, Phone numbers and more.
Installation
You can easily install this package by using Composer. Just run the following command from the root of your project.
composer require langleyfoxall/laravel-validation-rules
Validation Rules
If you wish to make changes to any of the validation rules, submit an issue or pull request so it can be discussed.
Usage
You can easily integrate the custom validation rules by calling the class on the individual attributes you wish to validate.
You can read more about custom validation classes here.
Example:
'mobile' => ['nullable', 'string', 'max:255', new UKPhoneNumber()],