Decimals
Decimal options limit how many decimal digits a value can have and set the separator between the integer and decimal parts. decimalMaxLength defaults to 18 and decimalMinLength to 0.
decimalMinLength: 27.00
Padded when the field loses focus
Precision limits
Separators
To detect separators from a locale, see Locale.
Typing and pasting a separator
- Separator input. Typing
,or.inserts the configured decimal separator. Numora blocks it if the value already has one. - Paste cleanup. Numora works out the format of pasted text from the text first. 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.