Validation on page elements prevents other actions to be triggered - Mendix Forum

Validation on page elements prevents other actions to be triggered


Calling nanoflow onChange or any other action triggers validations on page on all fields. 

If I have mandatory validation on 10 fields and one onChange event to show message it won’t be called until all fields on page are fulfilled. Its ridiculous behaviour because even after filling everything onChange is not called because it happened in the past so that logic is never triggered.


I tried everything but the only thing which remain is custom validation in custom Save microflow or before commit event. It removes usefulness of validation build in Mendix pages.


It should be changed to be triggered at the end when object is about to be saved in database or at least allow other actions to be triggered as well.

1 answers

While I agree that the implementation of the Validation option leaves something to be desired, I'd suggest not to use it overall and always build your data validation in microflows.

The reason for me recommending this, is that:

- You can extend your validations with custom logic that goes far beyond ‘Is this field empty or not’

- More importantly, when building custom validation logic in your microflow, you dictate that server side validation is always triggered when continuing from a page. So even if a tech-savvy user bypasses the client-side UI validation, the filled in data still is being validated by a microflow.