Decimals
Set how many decimal places are allowed and which separators the input uses.
decimalMinLength: 27.00
Padded when the field loses focus
Precision limits
Max decimal places
Try typing more than 2 decimal places. Extra typed digits are refused, and pasted ones are cut off, not rounded (the default limit is 18)
Min decimal places
Type "1" and click away. The input shows "1.00" on blur. A value your app passes is padded too. decimalMinLength above decimalMaxLength is an invalid option
Separators
European format
Type a number and it displays as "1.234,56"
For locale-aware separator detection, see Locale.
Built-in behavior
- Typing
,or.inserts the configured decimal separator. It is blocked if the value already has one. - Numora reads pasted text by its own format. When both
.and,appear, the last one is the decimal, so"1,234.56"becomes1234.56. A mark that repeats is grouping, so"12.34.56"becomes123456. - A single mark. When pasted text has one
.or one,, Numora reads it as grouping only if it could be grouping: one to three digits before it, exactly three after it, and no leading zero. In a default field a pasted12,345becomes12345. A pasted1,5,1234,567or0,123becomes1.5,1234.567or0.123. The field's own decimal separator is always the decimal: a pasted1,234is1234in a default field and1.234in ade-DEfield. - No decimals. With
decimalMaxLength=0Numora refuses a typed decimal separator, so typing12.5gives125. A paste keeps the integer part:12.75becomes12. - Invalid values. A negative or fractional limit, or
decimalMinLengthabovedecimalMaxLength, is an error. See invalid options.