Level 3
Found my answer here in the validation docs for Laravel
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
This has nothing to do with registration, this is concerned with general client form usage
I am using the typical Spark.post methods available when using spark forms with Vue js. I am wondering if there is anyway to validate and require inputs in a custom form based on their model before they submit, passing back errors, similar to how it is done with registration:
Spark::validateUsersWith(function () {
return [
'name' => 'required|max:255',
'age' => 'required|integer|min:1',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
'vat_id' => 'max:50|vat_id',
'terms' => 'required|accepted',
];
});
Any help is appreciated!
Found my answer here in the validation docs for Laravel
Please or to participate in this conversation.