How to check validation rules in microflow.

0
I have Account entity and Required and Unique validation rule applied on Email field as below:           I am taking Email as input for New User Sign Up. Problem I am facing is even though Email is not Unique and error message is shown on click action is still performed i.e. User is Signed Up. Now I want to do User Sign Up only when all validations are clear, hence have to check that all validations are clear inside Sign Up microflow. How to access validations rule status in microflow?
asked
2 answers
1

The basic concept of validating a form in Mendix by using a microflow is you create a variale and set it to true. Then for each inputfield you create an decision and check that field (e.g. Username !=empty) if this is false then you set the variable to false and put a validation feedback activity and give some feedback. If it is true then you merge the true outcome and false outcome and continue to the next decision… 
so this is the basic concept:

answered
0

Have a look at the documentation on setting up data validation. It gives various approaches and techniques you can try out.

https://docs.mendix.com/howto/data-models/setting-up-data-validation

For example, if you want to cheque uniqueness, you could setup a microflow to try to retrieve using that value as an XPath constraint. If you have data returning, it’s not unique.

answered