Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Bugfix/thousand separator in number validator #6326

Closed
wants to merge 4 commits into from
Closed

Bugfix/thousand separator in number validator #6326

wants to merge 4 commits into from

Conversation

DASPRiD
Copy link
Member

@DASPRiD DASPRiD commented May 26, 2014

HTML5 always transmits values in the format "1ß00.01", without a thousand separator. The prior use of the i18n Float validator allowed the thousand separator, which resulted in wrong numbers when casting to float.

@DASPRiD
Copy link
Member Author

DASPRiD commented May 26, 2014

That is pretty interesting. On the second build PHP 5.6 failed on a Zend\Cache test (so not related to this ticket), but succeeded on another run. I wonder how that test can conditionally fail without changes.

@jkavalik
Copy link

I thought it was resolved in #6303

@DASPRiD
Copy link
Member Author

DASPRiD commented May 26, 2014

@jkavalik Apparently only works up to a specific load.

$validators[] = new NumberValidator(array(
'locale' => 'en_US', // HTML5 uses "100.01" format
));
// HTML5 always transmits values in the format "1ß00.01", without a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on IRC, should be 1000.01

@Ocramius Ocramius self-assigned this Jul 28, 2014
@Ocramius Ocramius added this to the 2.3.2 milestone Jul 28, 2014
@Ocramius Ocramius closed this in 709fa39 Jul 28, 2014
Ocramius added a commit that referenced this pull request Jul 28, 2014
@Ocramius
Copy link
Member

Merged \o/

@Ocramius
Copy link
Member

Note: there's a failure, but it seems unrelated

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants