I've run into a headache trying to achieve something that should be simple to do in any other platform: Multiple validation messages for an input. With Mendix, you can only statically create a single string for the validation message.
This means that if you want to display multiple or dynamic validation messages, you have to manually mimic the functionality with custom javascript to apply the classes and insert the correct HTML into the form. If the Message field on the Validation section of the input allowed for placeholders, then we could simply pass through a validation message that is stored either in a NPE or from a parent dataview, allowing for dynamic messages.
Hi Alex,
If you want to show multiple validation message for single input,
If you want to show validation on the input field one by one -> double click on textBox-> go to events tab -> make a microflow at onLeave -> in the microflow write your multiple check one by one like $value/name!=empty in the decision box then check another condition and so on.
But if you want to show multiple validation on the all input fields at a same time just make one microflow on Save button & write your check logic.
Hope you like the answer.
Apparently I somehow missed the Validation feedback action...although I swear that was something I had already tested...the joys of developing on a new platform :D
For some additional context, the final solution I ended up was manually creating a "fake" validation message, with its visibility toggled by a boolean member of the entity. A nanoflow is set on the "change" event for the input, with a dynamic class set on the input to highlight. You have to remember to also add the "form-group" css class to the parent row, otherwise the fake message will be a few pixels off the input above it.
While this solution works, it goes against common Mendix practices and is not very intuitive. If the input itself allowed for dynamic/placeholders on the validation message, then everything could be achieved via a NPE.