how to check comma separator in regular expression?

1
Hi all, I want to add validation on textbox field in that I want to check that if decimal value contains comma  then It will show an error message i.e. Please enter value in correct format and if user enter 3 decimal  value (e.g. 100.234) then it will show different message i.e. please enter 2 decimal only in blue color. so  I want to add 2 message for 2 different conditions. so How to acheive this scenario? Thanks
asked
2 answers
0

Hi Madhura,

You could add a microflow that runs on page save.

The microflow should contain two conditions to check for the comma and the decimal precision, you can then show the appropriate validation message as required.

 

 

answered
0

Better is to set the validation at domain-level. You can set two validation-rules for one field. The warning-texts you define will get concatenated like in this example:

This however, like you already experienced, gets preceded by the ‘Invalid number’ check, which is checked frontend:

My advise is to use as much of the validation-functions that Mendix already offers.

answered