Skip to content

Conversation

@Amunak
Copy link
Contributor

@Amunak Amunak commented Mar 6, 2019

  • bug fix? no
  • new feature? yes
  • BC break? no
  • doc PR: n/a

For whatever reason numeric strings with explicitly positive values (i.e. +1 instead of just 1) have not been considered as valid numerics even though they are perfectly valid (in the sense that even forcibly changing their type to the respective numeric type works as expected).

This PR fixes that issue, adding consistency with PHP and the way numbers can be written to the Validator class.

I have marked this as "not bc breaking" because (1) this use case has not been covered by tests, so it doesn't change any and (2) nobody should accept '-1' as a valid value and expect '+1' to fail.

Please merge this with squash; I accidentally made one too many commits.

@Amunak
Copy link
Contributor Author

Amunak commented Mar 6, 2019

It would appear that your Travis test image is broken.

@dg
Copy link
Member

dg commented Mar 6, 2019

Thanks

@dg dg merged commit e4d30e5 into nette:master Mar 6, 2019
@Amunak Amunak deleted the Amunak-patch-1 branch March 6, 2019 15:03
dg pushed a commit that referenced this pull request Mar 12, 2019
dg pushed a commit that referenced this pull request Mar 15, 2019
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