How to prevent validation feedback in hidden tab?

1
Hi, I have a page with with a tab container with several tabs. Some tabs contain the same attributes but they are not visible at the same time. Basically a edit and a no-edit version of the same form. Before the form is set to no-edit it is validated and subsequently the visibility property of the tabs is changed.  The issues is that the feedback validation triggers the below error popup. It is correct in the sense that the hidden tab contains the attribute and it isn't validate correctly - but obviously not the desired functionality. This doesn't happen for hidden widgets in the same tab.  1) Is this how it should work? 2) Does it only happen to tab containers? 3) Is it possible to prevent feedback validation on a tab container, form or widget? Thanks // :) Fredrik  
asked
3 answers
2

Solution:

If I place the fields in the hidden tab inside a container and also set the containers conditional visibility then the feedback validation isn't triggered for those fields.

Interesting to note: I asked Mendix if this was expected behaviour from a tabcontainer... their reply was: "we concider this a feature request"

answered
1

You could argue that this is a bug, and Mendix should correctly handle validation for fields that are hidden. So you could file a ticket for this @ http://support.mendix.com/

As a workaround,if you are triggering the validation in a microflow with a validation feedback action, you could put an exclusive split with the same logic as the conditional visiblity on your tab before the validation feedback action, to only trigger the validation when the tab is visible.

answered
0

How are you validating these fields? are you marking the fields as required? If so, have you tried adding the validation on the entity level? This will only trigger when you commit, so if there as an object in the hidden tab that isnt being comitted the validation won't run. 

 

Another alternative is to use a microflow to validate. This way you can control the conditions on which fields will be validated. So instead of a standard save button, use a microflow button that will validate,  commit the action, and then close the page.

answered