Acknowledgements
Community contributors and rejected Laravel pull requests that inspired rules in this package.
This page credits the Laravel community contributors and rejected pull requests that inspired the rules in this package.
Overview
The Laravel core team maintains strict criteria for what enters the framework core. To keep the framework focused and adhere strictly to official RFC standards, many specialized validation rules are closed or rejected.
Those pull requests reflect real problems developers encounter in production applications. This package brings those community ideas together in one place with zero extra dependencies, modern PHP 8.3+ typing, and full test coverage.
Inspired pull requests
The table below lists each rule, the pull request that proposed it, and the original use case.
| Rule | Pull request | Inspiration |
|---|---|---|
without_alias |
#61522 | Reject plus-addressed email aliases (user+tag@gmail.com) to prevent trial abuse. Proposed by Punyapal; inspired the creation of this package. |
not_email |
#32103 | Prevent usernames and account handles from matching email formats to avoid login ambiguity. |
slug |
#27521, #36284 | Validate clean, URL-safe slugs with customizable separators. |
even, odd |
#33719 | Validate even and odd integer inputs without custom closures. |
semver |
#27798, #31086 | Validate Semantic Versioning 2.0.0 strings, including pre-release tags and build metadata. |
base64_string |
#31065, #36323 | Validate Base64 strings and Data URIs with optional MIME-type filters. |
luhn |
#28372, #38706 | Validate Luhn (MOD-10) checksum digits for payment cards, IMEIs, and identification numbers. |
min_words, max_words |
#37852, #41323 | Validate word count boundaries for text fields, summaries, and bios. |
domain |
#32197 | Validate domain names without requiring HTTP or HTTPS protocol prefixes. |
e164 |
#36720 | Validate international phone numbers formatted per ITU-T E.164. |
isbn |
#29402 | Validate ISBN-10 and ISBN-13 book identifiers with check-digit verification. |
country_code |
#35860 | Validate ISO 3166-1 alpha-2 and alpha-3 country codes. |
hex_color |
#38202 | Validate CSS hex color codes (3, 4, 6, or 8 digits). |
latitude, longitude |
#32039 | Validate coordinate ranges for latitude ([-90, 90]) and longitude ([-180, 180]). |
cidr |
#35874 | Validate IPv4 and IPv6 Classless Inter-Domain Routing (CIDR) subnet notations. |
email_domain |
#31885 | Restrict email addresses by domain whitelist or disposable domain blacklist. |
not_hashed |
#39891 | Verify that a password input is plain text and has not already been hashed with bcrypt or Argon2. |
alpha_underscore |
#28643 | Validate alphanumeric strings with underscores for strict code and database identifiers. |
unless_between |
#34512 | Validate that numeric values fall outside a given range. |
without_whitespace |
#15190 | Ensure input contains no whitespace characters for tokens and identifiers. |
no_html |
#42626 | Ensure input contains no HTML or XML tags in plain text fields. |
url_protocol |
#44909, #44911 | Validate that a URL uses an approved protocol scheme. |
snake_case |
#45348 | Validate strict snake_case formatting for slugs, column names, and keys. |
multiple_of |
#28135, #34959 | Validate that numeric values are an exact multiple of a given step. |
alpha_num_ascii |
#45609 | Enforce strict ASCII-only alphanumeric characters, rejecting Unicode homoglyphs. |
Submitting a rule
If you know of another rejected validation rule from laravel/framework that fits this package:
- Check that the rule can be implemented without adding third-party dependencies.
- Open an issue or pull request on GitHub.
- Include a link to the original
laravel/frameworkpull request or discussion.