Skip to content

Conversation

@alganet
Copy link
Member

@alganet alganet commented Feb 2, 2026

  • 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.

@alganet alganet requested a review from Copilot February 2, 2026 23:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codecov
Copy link

codecov bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.53%. Comparing base (63f7753) to head (0b79638).
⚠️ Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alganet alganet marked this pull request as ready for review February 2, 2026 23:56
 - 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.
@alganet alganet merged commit 16148e9 into Respect:main Feb 3, 2026
7 checks passed
@alganet alganet deleted the template-changes branch February 3, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants