12-05-2010 07:08 PM
I have the following html tag Input type=number in the web page:
<input autocapitalize="off" class="formField" id="amount" maxlength="10" name="amount" type="number" value="" />
When i enter the number with decimal value(10.24) in the input, i am unable to sumbit the page in the BlackBerry 9800 model OS Version 6.00.214 simulator.
When i enter number without the decimal value(10) in the input, i am able to sumbit the page in the BlackBerry 9800 model OS Version 6.00.214 or Version 188.8.131.527 simulator.
But the Input type="number" works fine in BlackBerry Bold 9700(versio 5.0), Bold 9000(Version 5.0 and 4.7) and Tour 9630(Version 5.0 and 4.7) etc.
It appears to be issue only OS 6.0 version.
Is there any workarround for this issue?
12-09-2010 03:15 PM - edited 12-09-2010 03:55 PM
This behavior is actually part ot HTML5 form validation.
If you want to disable client side validation for a form in HTML5 add a novalidate attribute to the form element.
Note that the spec calls for
But this does no conform to XHTML.
And this solved my problem.
05-19-2011 11:00 AM
To accept decimal number, you can use the input type "number" and use step="0.01" with it.
This works fine on playbook but the torch form validation is buggy.
It fails to accept cetain even number e.g. 2.22 but accespts 2.21,2.23 etc