Laravel Validate Package With Over 35 Pre-built Rules


April 18th, 2023

Laravel Validate Package With Over 35 Pre-built Rules

Validate for Laravel is a package by Milwad that helps developers write validation logic faster with plenty of useful Rule Objects included:

use Milwad\LaravelValidate\Rules\ValidPhoneNumber;
use Milwad\LaravelValidate\Rules\ValidIpAddressIPV6;
return [
'phone' => ['required', new ValidPhoneNumber()],
'ip_address_v6' => ['required', new ValidIpAddressIPV6()],

This package provides developers with a variety of pre-built validation rules that can be easily integrated into their Laravel projects, allowing them to write validation logic faster and more efficiently. With over 35 rule objects for everything from phone numbers to slugs, this package makes it easy to validate user input in a variety of scenarios. Plus, with translations available for over ten languages, this package offers even more flexibility and convenience for Laravel developers around the world:

  • ValidBitcoinAddress
  • ValidCapitalCharWithNumber
  • ValidDiscordUsername
  • ValidHashtag
  • ValidIpAddressIPV4
  • ValidIpAddressIPV6
  • ValidPhoneNumber
  • ValidPort
  • ValidSlug
  • ValidBase64
  • ValidJwt
  • ValidDomain
  • ValidCamelCase
  • ValidPascalCase
  • ValidKebabCase
  • ValidSnakeCase
  • And more...

You can see the complete list of rules in the project's readme and setup instructions. Also, at the time of writing, this package has validation translations for over ten languages, such as English, Chinese, French, Japanese, and more!

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.