Make textbox required depending on an textbox value.

0
Im trying to do the following in Mendix: if textbox value == "01"  make “Validation textbox” required.   Is there anyway to do this in a microflow?
asked
1 answers
1

Add an exclusive split for the text. In case it is not required, simply continue. If it is required, do whatever you need to do. Like add a validation feedback on the attribute or a second exclusive split to check if another value is entered. Whatever fits your use case.

 

Checkout this page for more inspiration: https://docs.mendix.com/howto/data-models/setting-up-data-validation#4-advanced-validation-with-a-custom-save-button

Another best practice for validation in microflows is to add a boolean variable set to true at the beginning. Whenever any validation fails, change that variable to false. At the end of all validations in that microflow, this boolean will tell you if it failed overall or not. This prevents sending back a single validation feedback after a fail instead of sending all validation feedback at once.

answered