Standalone form validation

im having another brain fart. When doing a standalone form with a submit button that is tied to submit(), how can ensure rules() within the form are valid before it will submit? simple things like required halt it using a standard html5 response, but a custom rules() does not. I am using
->rules([
    function ($attribute, $value, $fail) {
        if ($value !== auth()->user()->name) {
            $fail('Your signature must match your name on file.');
        }
    },
])
Was this page helpful?