-
Notifications
You must be signed in to change notification settings - Fork 104
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
3.0.0.RC1 - f:all - Invalid markup is being generated for numeric fields. Commas are added to type number. #301
Comments
Not sure why you are formatting a number for an input value? I would think it would be best to change this
to
|
So it looks like you can set the property grails.plugin.fields.localizeNumbers = false to fix this but it might not format the number at all. |
actually it will still format the view part and not the input area with grails.plugin.fields.localizeNumbers = false so I don't think this is a bug. This should probably be the default though, as you said formating input type number is invalid. |
Hi Ryan, Thanks for identifying That got my forms working again. I don't have a bias on whether is should be true or false, but in any case, the input value should DEFINITELY NOT be formatted because it is invalid markup and fails in both Chrome and Safari. I recommend either way changing
to
as previously mentioned. |
yes it appears the only place that flag is used for that field, so I'm not sure why it's configurable at all if true just makes an invalid input box. |
I have created a very basic grails 4.0.0.RC1 app to demonstrate the problem:
https://github.com/codeconsole/grailsnumberbug
<f:all bean="bug"/>
creates an input field
<input type="number" name="num" value="123,456,789" required="" id="num">
which is not valid markup in either Chrome or Safari.
The default behavior should be to not put commas in numbers due to the fact it breaks everything
The text was updated successfully, but these errors were encountered: