Skip to content

Commit 974e9dc

Browse files
author
Joe Gilreath
committed
docs(readme): updated for valid value feature
1 parent 3624fad commit 974e9dc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ const control = new FormControl('');
157157
control.value$.subscribe(value => ...);
158158
```
159159

160+
### `validValue$`
161+
162+
Similar to value$; Observes the control's value and **only** emits if the control is valid.
163+
164+
```ts
165+
import { FormControl } from '@ngneat/reactive-forms';
166+
167+
const control = new FormControl(null, [Validators.required]);
168+
control.validValue$.subscribe(value => ...);
169+
```
170+
160171
### `disabled$`
161172

162173
Observes the control's `disable` status.

0 commit comments

Comments
 (0)