Validation rule on max field length is not giving a message

1
I have an entity "issue". "Issue" is derived from "AbstractTask", "AbstractTask" has an attribute "Description", length 500. In have a dataview with a Textarea Autogrow showing "Description". I now want the user to be notified when he tries to commit more than 500 characters. Therefore, I set the custom "Save and Close" button to "Abort on validation errors". And I put a "max length 500" validation rule on "Issue" in the domain model (not in an MF). Result: I do not geta message in the UI, only in the modeler: (com.mendix.core.CoreRuntimeException: Attribute 'IssueManagement.Issue.Description' has a maximum length of 500, tried setting a value of length 645.) Putting the validation rule on "AbstractTask" instead of "Issue" makes no difference. What am I doing wrong? ============ Using a Textarea instead of a Textarea Autogrow, I get the message in red below the field "value too long". I still do not get the message from the validation rule. Does it mean this behaviour (the "value too long" check) is not available in the Textarea Autogrow widget? And I should ask the widget builder to add this? When can I expect to see the validation rule message? It seems to be hidden behind an earlier check.
asked
3 answers
1

Probably the widget doesn't handle the error. What if you use a regular edit box?

answered
1

Hi Toon,

I think this message is not triggered by your validation rule, but by the domain model in which the attribute has a maximum length of 500. If you set it to unlimited, and check manually on the length with a validation rule, it might work correctly.

Or you might file a bug report, to make the widget handle this exception.

answered
0

Are you returning false in the microflow on save? Did you try an error message instead of validation? Did you try microflow debugging?

answered