Partial validation with custom event

Hello community,

in our application, we want a custom event to be executed via a button, and after a partial validation has been passed. I tried the obvious and simply set “Partial Validation” in the Validation Mode of this button in the SME. In our application, this button then triggers a partial validation, and although the document is not partially valid, the event is still executed.

Is the Validation Mode not working with custom events? I found Full validation on custom event with form engine which is more than 5 years old and I could not find some of the terms on my search on getA12, so I am not sure if this instruction is still up to date, hence my new entry here.

Note: I tried this on 2023.02-ext2, we are currently upgrading to 2023.06-ext3.

Hi @ekessler :slight_smile:

first things first:

did you try the partial validation in the form model preview?

If you did and this works, then your project code is possibly listening for the wrong action in their saga/middleware.

Other thing to remember is that partial validation is not validating the whole form but only the current screen.

And just for completeness, the redux action flow of a event button click from CRUD form. See the timing of when validation is done. After EVENT_BUTTON_TRIGGERED but before EVENT_BUTTON event.

Thank you very much @markus-agile-fog!

The saga did listen to the wrong action - EVENT_BUTTON_TRIGGERED instead of EVENT_BUTTON. Changing that lead to the desired behaviour.