Show validation rule error message instead of required message of form item

2
Hi, In my domain model I have an attribute with a 'required' validation rule and defined an error message on it. On a form I've put that attribute as a reference selector. If I do not define the ref.selector as required, the form accepts it if left empty. So, I defined it as required and actually expected the error message of the validation rule to be shown, when I leave the form field empty. Instead I get a warning that the 'Empty required message while required is true'. This would mean I have to maintain two messages. OK, you could define a different message, but I think most of the time it will be the same. My question: Is there a way to use (force?) the validation rule error message is above situation? Thanks in advance! Menno
asked
3 answers
1

The message indicates that you have set the 'required' property to true on the reference selector. This is not needed if you have an validation rule in your domain model. That rule will be applied, regardless whether the required property is set on the reference selector.

answered
1

Don't know about your specific situation but it is not possible to specifically set a validation rule for a reference selector in the domain model. One way around is to use validation feedback microflow activity.

answered
0

Didn't see the other answer... Reaction on Michel: This is not the behaviour I experience. The validation rule is applied when I enter new 'projects', but when I use 'project' as a reference selector (either nummer or name) the rule is not applied. Hence, I don't see the error message. However, a record is inserted leaving the project reference empty.

Reaction on Karol: Yes, microflow could be done, but I think this could (should?) be modelled very well in the domain model.

answered