Sorting of validation message

0
Hi,   I have a scenario where we validate three date fields. If empty, it should give validation message. Right now, it gives the error message like below. Can we show it in order ex. DI3 followed by DI4 followed by DI5? Basically, can we sort the message?
asked
4 answers
1

You could make a ValidationMessage-variable (string) and build that in sequence where required and display that in your pop up. So it effectively is 1 message but it's contents are variable. 

That's one way to do it. Assuming you want it in a popup.

answered
0

Does the validation happen on database level, on the front-end or in a microflow that is being triggered? The different ways and places to validate may give you different options for what you require.

answered
0

I assume the error shown comes from the validations you set on the entity. For user friendliness its better to catch these validations in a micro/nanoflow before the system does it on commit.

You can compose a validation message in a microflow like Damien suggests or you can put your validations in the right order in the microflow and do a show validation feedback for each error you run into.

https://docs.mendix.com/howto7/data-models/setting-up-data-validation/#4-advanced-validation-with-a-custom-save-button

 

answered
0

Hi,

 

try you can try extracting the number from the string using regex and then sort the list according to your requirement . This will help you to get the desired result. 

You can use the below links for regex.

https://docs.mendix.com/refguide/string-function-calls/

https://docs.mendix.com/refguide/regular-expressions/ 

answered