Skip to content
This repository was archived by the owner on Feb 12, 2020. It is now read-only.

Commit d7046c4

Browse files
committed
add clearFormErrors()
1 parent 7740065 commit d7046c4

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,27 @@ this.setFormErrors('myForm', errors);
122122
```
123123

124124

125+
### Method: clearFormErrors()
126+
127+
This method can be used to quickly unset all errors for a form.
128+
129+
#### Arguments
130+
131+
| Type | Name | Description |
132+
| ---- | ---- | ----------- |
133+
| *string* | formName | The name of the form. |
134+
135+
#### Returns
136+
137+
This method will clear the form errors and return `TRUE`, or `FALSE` if bad arguments were passed.
138+
139+
#### Example
140+
141+
```javascript
142+
this.clearFormErrors('myForm');
143+
```
144+
145+
125146
### Method: formTouched()
126147

127148
This method can be used to determine whether or not a form or a specific field has been "touched".

0 commit comments

Comments
 (0)