Model Object
clearErrors()
Signature
Section titled “Signature”clearErrors() — returns void
Available in: model
Category: Error Functions
Description
Section titled “Description”Clears out all errors set on the object or only the ones set for a specific property or name.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
property | string | no | — | Specify a property name here if you want to clear all errors set on that property. |
name | string | no | — | Specify an error name here if you want to clear all errors set with that error name. |
Examples
Section titled “Examples”// 1. Clear all errors on the object
this.clearErrors();
// 2. Clear all errors set on the `firstName` property
this.clearErrors(property="firstName");
// 3. Clear only errors that were set with a specific error name
this.clearErrors(name="invalidFormat");
// 4. Clear errors on a specific property that were also set with a specific name
this.clearErrors(property="email", name="duplicateEmail");