Standardize and improve validation message templates#1670
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes and improves validation message templates across the codebase by removing redundant qualifiers, improving grammar, and enhancing clarity.
Changes:
- Removed redundant "valid" prefixes from 34 validators (e.g., "must be a valid email" → "must be an email address")
- Removed redundant "value" suffixes from 9 type validators (e.g., "must be a string value" → "must be a string")
- Standardized "consist only of" phrasing for 15 character-set validators replacing inconsistent "contain only" or "contain" wording
- Improved file accessibility messages for 7 filesystem validators to be more explicit
- Enhanced grammar and article usage in 5 validators
Reviewed changes
Copilot reviewed 278 out of 278 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Multiple validator source files (src/Validators/*.php) | Updated message templates to remove "valid" prefix, "value" suffix, and standardize phrasing |
| Multiple test files (tests/feature/Validators/*.php) | Updated expected error messages to match new templates |
| Multiple documentation files (docs/validators/*.md) | Updated template examples and added changelog entries for version 3.0.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
20c3d62 to
28b83d3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1670 +/- ##
============================================
- Coverage 99.53% 99.53% -0.01%
- Complexity 923 928 +5
============================================
Files 190 190
Lines 2171 2169 -2
============================================
- Hits 2161 2159 -2
Misses 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
28b83d3 to
8b554a9
Compare
- Remove redundant "valid" prefix: Date, DateTime, DateTimeDiff, Domain, Email, Iban, Imei, Ip, Isbn, Json, LanguageCode, LeapDate, LeapYear, Luhn, MacAddress, NfeAccessKey, Nif, Nip, Pesel, Phone, Pis, PolishIdCard, PostalCode, Roman, Slug, Tld, Url, Uuid, Version. - Remove redundant "value" suffix ArrayVal, BoolVal, Countable, FloatVal, IntVal, IterableVal, NumericVal, ScalarVal, StringVal. - Standardize "consist only of" phrasing Alnum, Alpha, Cntrl, Consonant, Digit, Graph, Lowercase, Printable, Punct, Space, Spaced, Uppercase, Vowel, Xdigit. - Improve file accessibility messages Directory, Executable, File, Image, Readable, SymbolicLink, Writable. - Improve grammar and article usage CreditCard, Extension, Mimetype, Regex, Size.
8b554a9 to
0b79638
Compare
henriquemoody
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove redundant "valid" prefix: Date, DateTime, DateTimeDiff, Domain, Email, Iban, Imei, Ip, Isbn, Json, LanguageCode, LeapDate, LeapYear, Luhn, MacAddress, NfeAccessKey, Nif, Nip, Pesel, Phone, Pis, PolishIdCard, PostalCode, Roman, Slug, Tld, Url, Uuid, Version.
Remove redundant "value" suffix ArrayVal, BoolVal, Countable, FloatVal, IntVal, IterableVal, NumericVal, ScalarVal, StringVal.
Standardize "consist only of" phrasing Alnum, Alpha, Cntrl, Consonant, Digit, Graph, Lowercase, Printable, Punct, Space, Spaced, Uppercase, Vowel, Xdigit.
Improve file accessibility messages Directory, Executable, File, Image, Readable, SymbolicLink, Writable.
Improve grammar and article usage CreditCard, Extension, Mimetype, Regex, Size.