Trailing zero padding
Author: shonnsCreated Jun 26, 2019Updated Jul 4, 2024
HI, when i use createNumberMask in Angular, when i get decimal data from server i was hoping that the values would always show 2 digits after the decimal, even if none were entered:

My config for mask:
this.mask = createNumberMask({
prefix: this.prefix ? this.prefix + ' ' : '',
suffix: this.suffix ? ' ' + this.suffix : '',
includeThousandsSeparator: true,
thousandsSeparatorSymbol: ' ',
allowDecimal: true,
decimalSymbol: '.',
decimalLimit: 2,
integerLimit: null,
requireDecimal: true,
allowNegative: true,
allowLeadingZeroes: true
});Is it possible to do this ?
Source: text-mask/text-mask