I have the following NumberTextBox
and i wanted to allow only the digits,but i don't know what is the constraints
properties used to make it possible.
<input type="text" data-dojo-type="dijit.form.NumberTextBox" invalidMessage="Please enter only numbers" constraints="{}" required="true"
You can have following for example:
constraints: { min:0, places:0}
see also: http://www.unicode.org/reports/tr35/#Number_Format_Patterns
Using the dojo NumberTextBox you are still allowed to enter characters: a, b, c. It only gives you invalid message. If you want to only allow digit input, you can use the javascript here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With