Open WireNinja opened 1 year ago
Describe the bug Failed to catch validation by using auth scaffold in leaf cli. The error message :
htmlspecialchars(): Argument leafsphp/leaf#1 ($string) must be of type string, array given (View:\app\views\pages\auth\login.blade.php)
Default validation :
// login controller auth()->guard('guest'); $data = request()->get(['username', 'password']); $isValid= form()->validate($data, [ 'username' => 'text', 'password' => 'required', ]); if (!$isValid) { echo view('pages.auth.login', array_merge($data, [ 'errors' => array_merge( auth()->errors(), form()->errors() ), ])); } // login.blade.php {{ $errors['password'] ?? null }} // default view, this give me error {{ $errors['password'][0] ?? null }} // this is working
To Reproduce Steps to reproduce the behavior:
Expected behavior Validation message should be like this : Thankyou.
Describe the bug Failed to catch validation by using auth scaffold in leaf cli. The error message :
Default validation :
To Reproduce Steps to reproduce the behavior:
Expected behavior Validation message should be like this : Thankyou.