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

Validators: isNumeric support string number '1.' #276

Merged
merged 3 commits into from
Jan 10, 2022
Merged

Conversation

h4kuna
Copy link
Contributor

@h4kuna h4kuna commented Jan 10, 2022

  • bug fix
  • BC break? no

The goal of this change is same behavior for float and string number.

Old behavior

Validators::isNumeric(1.); // float number true
Validators::isNumeric('1.'); // string number false

New behavior

Validators::isNumeric(1.); // float number true
Validators::isNumeric('1.'); // string number true

And I wrote test for to keep back compatibility. How you can see in three commits.

@dg
Copy link
Member

dg commented Jan 10, 2022

Thanks

@dg dg changed the title Validators isNumeric support string number '1.' Validators: isNumeric support string number '1.' Jan 10, 2022
@dg dg merged commit 75a7ba8 into nette:master Jan 10, 2022
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