> */ public function rules(): array { return [ 'email' => [ 'required', 'string', 'email', 'max:255', ], 'password' => [ 'required', 'string', ], ]; } protected function prepareForValidation(): void { $email = $this->input('email'); if (is_string($email)) { $this->merge(['email' => trim($email)]); } } }