We have moved to GitHub Issues
Created by Sebastiaan Janssen 19 Aug 2012, 14:51:31 Updated by Sebastiaan Janssen 05 Jun 2015, 16:28:23
Relates to: U4-902
Relates to: U4-1314
Subtask of: U4-760
I have a Numeric field within a page. When a non integer is added no errors are created but the field comes back empty. This is a problem as the user thinks everything is ok. We noticed this problem when adding commas to numbers, i.e.
19000 > 19,000
I have tried adding regular expression validation to ensure it is a number. However it is seems that the validation is done after the attempt to convert to an number which is wiping the data so the validation is performed on an empty field. This latter bit is my theory on how it is working.
I am using umbraco v 4.5.2 (Assembly version: 1.0.3891.20719) with mySQL
''Originally created on CodePlex by [billyhomebase|http://www.codeplex.com/site/users/view/billyhomebase]'' on 2/14/2011 3:44:55 PM [Codeplex ID: 30034 - Codeplex Votes: 4]
regular expression now fires, but the datatype won't allow saving of anything other than an integer (this is to prevent saving invalid values in a int db field) - Would it make sense to remove the option specifying the database datatype, defaulting it to use 'int' - backwards compatibility for setups that have used txt fields ?
@Hendy can you make it so that either gives a validation error when saving please? Right now it doesn't save anything if the value if not an int which is not what you'd expect.
Patch attached to allow commas to be entered for Thousands. To display a validation message is going to require a pretty significant rebuild of the property editor and I therefore think it should be a separate issue. It is also going to be a similar challenge to that described in U4-854.
Perfect! Thanks Jeavon!
Fixed in changeset fa1b18236d0f
Backwards Compatible: True
Fix Submitted: Patch
Due in version: 4.10.0