I am using inputMask with validators. In one case when value is auto populated it is giving error (Negative numbers and special characters are not allowed) even when the value is right. The value used is MYR 23,456.00 that gets auto populated. With the mouse when I click on the field and then click outside the field the error disappears. I am not able to understand what part I am doing wrong.
{
"type": "text",
"inputMask": {
"alias": "currency",
"autoUnmask": false,
"allowMinus": false,
"prefix": "MYR "
},
"name": "claims_history_estimated_damages",
"visibleIf": "{claims_history_claim_or_legitigation_brought} = 'yes'",
"title": "Estimated Damages (including defense costs)",
"isRequired": true,
"customPropSetter": {
"target": "m-question-marker",
"props": [
{
"name": "text-align",
"value": "left"
}
]
},
"validators": [
{
"type": "regex",
"text": "Negative numbers and special characters are not allowed",
"regex": "^\\d+(.\\d{0,}\\d)?$"
}
]
}