The following link said that 'Validation rules are always triggered when changes to an object are committed'.
But actually according to Mendix Support, most validation rules are triggered on change, with the exception of unique constraints, which are triggered on commit.
The validations are done when microflow buttons will send the changes without comit - for new objects too - . During doing the changes, the validations are done, but only on the changed members.
Because of this, we have to create microflow to check validatons at folloing situation.
attribute1 : use input widget validation
attribute2 : use entity validation
1. A user input invalid value to attribute1 and attribute2
2. A user hit a microflow button which sends the object's changes.
-> input widget validation is done (invalid) , then warning message of
-> attribute1 is shown
3. A user correct attribute1 value and not change attribute2 (since user doesn't know attribute2's value is invalid.)
4. A user hit a microflow button again
-> input widget validation is done (valid) , then Entity validation is
-> done , then warning message of attribute2 is shown
Idea as follows:
- Entity validation rules are done only when object is committed