-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fixes #6647 : Zend\I18n\Validator\Float set error message for NOT_FLOAT #6648
Fixes #6647 : Zend\I18n\Validator\Float set error message for NOT_FLOAT #6648
Conversation
return array( | ||
array( | ||
'hello', | ||
2.000,000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would take out this second one, or specify that it's en-US locale. This is a valid float in many locales. Thanks for catching that I didn't set the error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moderndeveloperllc so the validator itself should be return true for 2.000,000
? /cc @DASPRiD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to have this test at all. We already have testValidationFailures
on line 151 which covers the conditional. Adding the $this->error(self::NOT_FLOAT);
in those two places is fine, but we don't need to touch the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moderndeveloperllc Ok, I removed the additional tests, thank you.
@moderndeveloperllc Ok, I removed the additional tests, thank you. |
09c2d3d
to
be9e13b
Compare
be9e13b
to
0def83f
Compare
Still not merged? |
still waiting for merge... |
0def83f
to
1c6d909
Compare
@samsonasik may I ask you to add a test here? This has been changed various times, and the bug came up as a regression AFAIK. |
@Ocramius, @moderndeveloperllc said it doesnt' need new test. I can re-add this test samsonasik@dfd48e1 if needed... |
@samsonasik well, I'd need a test that fails if this PR is reverted :-) |
1c6d909
to
b23b547
Compare
@Ocramius done ;). I've added test case to fit catch self::NOT_FLOAT in that condition. |
@samsonasik merged, thanks! |
…inor CS fixes (spacing)
…dding `@group` annotation referencing the open pull request
…endframework#6647-zend-i18n-validator-float-not-float-error-message' Close zendframework/zendframework#6648 Close zendframework/zendframework#6647
…endframework#6647-zend-i18n-validator-float-not-float-error-message' into develop Close zendframework/zendframework#6648 Close zendframework/zendframework#6647 Forward port zendframework/zendframework#6648 Forward port zendframework/zendframework#6647
Fixes #6647