How to validate inside `handleRecordCreation()` or `mutateFormDataBeforeSave`
Hello guys, hope you're doing well!
I want to validate or use a custom validation rule inside
mutateFormDataBeforeSave()
, wonder how to do that?
Thanks in advance!4 Replies
Hey @Leandro Ferreira, and thanks a lot for your help!
I'm using a repeater, and I want to get values that are outside the repeater
I added this rule to one of the repeater attributes, but I it only get the values inside a single repeater
So that's why I thought of making the validation inside
handleRecordCreation
and mutateFormDataBeforeSave
, but then wondered how to display the validation error before running $this->halt();
Solution
You're a life saver man, thanks!