Skip to content

Commit 16bfc90

Browse files
committed
docs: update readme
1 parent 248ddb8 commit 16bfc90

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ now you can use validationContext and formFieldContainer it your template
5151

5252
According to the Validators set in the FormControl the errors appears when the input is invalid, dirty and touched.
5353

54+
### Clearing
55+
56+
The ValidationContextComponent has a imperative clear that resets all fields removing all errors.
57+
58+
```
59+
import {ValidationContextComponent} from '@xtream/ngx-validation-errors';
60+
61+
62+
@ViewChild(ValidationContextComponent) context: ValidationContextComponent;
63+
64+
65+
clearAll() {
66+
this.context.clear()
67+
}
68+
}
69+
```
5470
### Configuration
5571

5672
The library can be configured using the `forRoot` static method

0 commit comments

Comments
 (0)