Closed thakurdinesh2 closed 1 year ago
Hi @thakurdinesh2, you can follow the steps:
First you must disable the wizard cache
option on your WizardController, and let the saveData()
method called on after each step:
class UserWizardController extends Controller
{
use Wizardable;
protected $wizardOptions = [
'cache' => false,
];
}
Throw the ValidationException
when the CURL error throws in the Step class, then will show the error message under the name
field:
class NameStep extends Step
{
public function saveData(Request $request, $data = null, $model = null)
{
throw ValidationException::withMessages([
'name' => 'The CURL request has some error.',
]);
}
}
You can try it~
Use Version: Use version when bugs appear.
Describe the bug Try to call curl request and get some errors. Is there any way to stop on same step with errors ?
To Reproduce Provide some code here to reproduce the bug.
Expected behavior A clear and concise description of what you expected to happen.
Additional context Add any other context about the problem here.