* Check the `decimalPlaces*` options and output the relevant warnings if some of those will get overwritten during the initialization or settings update. * * @param {object} options * @private
(options)
| 4308 | * @private |
| 4309 | */ |
| 4310 | static _validateDecimalPlacesRawValue(options) { |
| 4311 | // Checks if the number of decimal places for the raw value is lower than the `decimalPlaces`, `decimalPlacesShownOnFocus` and/or `decimalPlacesShownOnBlur` options |
| 4312 | if (!AutoNumericHelper.isNull(options.decimalPlacesRawValue)) { |
| 4313 | if (options.decimalPlacesRawValue < options.decimalPlaces) { |
| 4314 | AutoNumericHelper.warning(`The number of decimal places to store in the raw value [${options.decimalPlacesRawValue}] is lower than the ones to display [${options.decimalPlaces}]. This will likely confuse your users. |
| 4315 | To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlaces\`.`, options.showWarnings); |
| 4316 | } |
| 4317 | |
| 4318 | if (options.decimalPlacesRawValue < options.decimalPlacesShownOnFocus) { |
| 4319 | AutoNumericHelper.warning(`The number of decimal places to store in the raw value [${options.decimalPlacesRawValue}] is lower than the ones shown on focus [${options.decimalPlacesShownOnFocus}]. This will likely confuse your users. |
| 4320 | To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlacesShownOnFocus\`.`, options.showWarnings); |
| 4321 | } |
| 4322 | |
| 4323 | if (options.decimalPlacesRawValue < options.decimalPlacesShownOnBlur) { |
| 4324 | AutoNumericHelper.warning(`The number of decimal places to store in the raw value [${options.decimalPlacesRawValue}] is lower than the ones shown when unfocused [${options.decimalPlacesShownOnBlur}]. This will likely confuse your users. |
| 4325 | To solve that, you'd need to either set \`decimalPlacesRawValue\` to \`null\`, or set a number of decimal places for the raw value equal of bigger than \`decimalPlacesShownOnBlur\`.`, options.showWarnings); |
| 4326 | } |
| 4327 | } |
| 4328 | } |
| 4329 | |
| 4330 | /** |
| 4331 | * Return `true` if the settings/options are valid, `false` otherwise. |
no test coverage detected