Common Laravel Validation Rules

dev-master 2017-11-19 20:42 UTC

This package is auto-updated.

Last update: 2021-12-29 02:22:23 UTC


A set of common validation rules that I found myself using throughout a lot of my applications. Laravel's Validator will be extended with the set of rules so no configuration is required.


Simply install via composer:

composer require mtrajano/laravel-validations

For Laravel <=5.4, make sure to also add the service provider to your config/app.php class:


Validation Rules

  • zipcode: US ZIP and ZIP+4 formats
  • latitude: Any float value between -90 and 90, inclusive
  • longitude: Any float between between -180 and 180, inclusive
  • routing: Must be a valid routing number passing the ABA checksum
  • countrycode: Valid country code (either ISO2 or ISO3 formats)
  • phone: Valid US phone number
  • uuid: A valid Universally Unique ID according to RFC 4122


Pull requests and issues are welcome!