Validation
Forms States
| Changed | Validity | Visited |
|---|---|---|
| pristine | valid | touched |
| dirty | errors | untouched |
Built-in Validation Rules
this.customerForm = this.fb.group({
firstname: ['', [Validators.required, Validators.minLength(3)]],
sendCatalog: true
});
Change Validation Rules at runtime
myControl.setValidators([Validators.required]);
myControl.clearValidators();
myControl.updateValueAndValidity();
Reactive Transformation
- deBounceTime
- Ignore events until a specific time has passed without another event
- throttleTime
- Emits a value, then ignores subsequent values for a specific amount of time
- distinctUntilChanged
- Supresses dublicate consecutive items