-
Notifications
You must be signed in to change notification settings - Fork 85
Description
Description
When putting a trigger on the Next-button like this
I expected to see my custom error message at the top of the page when i pressed the button without filling in the field on the page. It only gives me the standard text:
To Reproduce
- Create a Next-button with "triggers": ["validatePage"] on the same page as you have a custom validation for a required field. (mine was an integer field)
- Do NOT put a value in the required field, but press the Next-button directly
- The standard text for the error box is shown at the top of the page. This standard text does not fit the UU-criteria for development.
I tried to make this work in this form https://ssb.apps.tt02.altinn.no/ssb/ra0678/.
Expected behavior
I expected this kind of code
in ValidationHandler.cs to return my customized text in the Error box. The message on the field itself is shown correctly.
Screenshots
Here is the kind of message that I expected to see:
Additional info
The error text is shown as expected when I trigger the validation that is defined directly on the field. But then I have to first put a value on the field and then delete it again.
Interestingly enough this also worked as expected if I used validateAllPages instead of validatePage
"triggers": ["validateAllPages" ],
I tested this in Chrome.