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

[9.x] Trims numeric validation values / parameters #45912

Merged
merged 12 commits into from
Feb 2, 2023

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Feb 2, 2023

With the introduction of brick/math to handle the numeric validation rules, we had a slight regression. Previously values were cast to int or float by PHP. When PHP does this it trims any whitespace.

'\n 5 ' > 5

// same as

5 > 5

brick/math will throw an exception if the value contains whitespace. To restore the previous functionality we are now trimming the value and parameters where suitable.

This regression was raised in #45762 (comment)

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