laravel-validation-rules/country-codes
Country Codes
Validates 2 & 3 character country codes.
Installation
composer require laravel-validation-rules/country-codes
Usage
Validate a 2 character country code.
use LVR\CountryCode\Two;
$request->validate([
'country' => ['required', new Two],
]);
Validate a 3 character country code.
use LVR\CountryCode\Three;
$request->validate([
'country' => ['required', new Three],
]);
Related Packages
jedrzej/validator-extended-syntax
Laravel 4/5 package that adds validator negation to Laravel's validation module
11,580
3
digitonic/validation
A Laravel custom validation package with some out of the box validators.
2,526
2
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 4.2.0 | ^7.3| | ^5.5| | Apache-2.0 | |
| 4.1.0 | ^7.3| | ^5.5| | Apache-2.0 | |
| 4.0.0 | ^7.3| | ^5.5| | Apache-2.0 | |
| v3.0.0 | ^7.3| | ^5.5| | Apache-2.0 | |
| 2.2.0 | ^5.5| | Apache-2.0 | ||
| v2.1.0 | ^5.5| | Apache-2.0 | ||
| v2.0.0 | ^5.5| | Apache-2.0 | ||
| V1.1.0 | ^5.5 | Apache-2.0 | ||
| v1.0.0 | ^5.5 | Apache-2.0 |