Skip to content

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