Custom form not validating last wizard step.
As you can see the first steps on my wizard get validated correctly upon clicking "next".
But upon clicking submit on the last step. It just triggers the submit function i put with wire:click on the submit button, without validating the captcha or the checkboxes.
Thank you for your help.
10 Replies
Btw here's a screenshot that shows my submit button alongside the submit function
did you add the mount method?
Hello, thanks for the quick reply. Yes i have it to fill the form
I found out how to validate the last step I have using this in my submit function. Care to explain why the behaviour is like this ?
$this->form->getState()
will validate the formOn top of the ->rules() i have put alongside required() or accepted() you mean ?
on the top of the rules, what does it mean?
you should add validation to the fields..
For example, my third step, i have ->accepted() and ->required()for my checkbox. as you can see, If i comment the code inside the submit function it would not trigger the rules of the checkboxes WHICH are on the last step. That has been my issue all along
sorry, I didn't understand what you are trying to do.
As I mentioned,
$this->form->getState()
will validate your form..