input('email'))) { $this->merge(['email' => mb_strtolower(trim($this->input('email')))]); } } public function rules(): array { return [ 'nombre_apellido' => ['required', 'string', 'max:255'], 'email' => [ 'required', 'email', Rule::unique('users', 'active_email')->where('rol_codigo', $this->user()->rol_codigo) ->whereNull('deleted_at') ->ignore($this->user()->id), ], 'dni' => ['nullable', 'string', 'regex:/^[0-9]{7,8}$/'], 'telefono' => ['nullable', 'string', 'regex:/^\+?[0-9\s\-]+$/'], 'password' => ['nullable', 'string', Password::min(8)->mixedCase()->symbols()], ]; } }