Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify ASCII numerals in alpha_dash and alpha_num validation rules #10220

Merged

Conversation

austincarpenter
Copy link
Contributor

@austincarpenter austincarpenter commented Mar 1, 2025

ASCII characters in the \p{L} regex ranges are clarified as a-z and A-Z for the alpha_dash and alpha_num validation rules. ASCII numerals in the \p{N} range (0-9) are not.

This PR adds ", and 0-9" where relevant.

@austincarpenter austincarpenter changed the title Clarify ASCII numerals Clarify ASCII numerals in alpha* validation rules Mar 1, 2025
@austincarpenter austincarpenter changed the title Clarify ASCII numerals in alpha* validation rules Clarify ASCII numerals in alpha_dash and alpha_num validation rules Mar 1, 2025
@austincarpenter
Copy link
Contributor Author

Should the alpha_dash description go one step further? I.e.:

"To restrict this validation rule to characters in the ASCII range (a-z, A-Z, 0-9, - and _), you may provide..."

I feel like most people would always opt for the :ascii variant of the rule and having the ranges comma-separated like this without describing them makes visually identifying the rules much easier.

@taylorotwell taylorotwell merged commit 4a3b41f into laravel:12.x Mar 4, 2025
@austincarpenter austincarpenter deleted the clarify-ascii-validation-characters branch March 5, 2025 01:54
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.

None yet

3 participants