Slide 30
Slide 30 text
Reactive Forms: Error Validation
17.10.2018 WDC - Formulare in Angular
30
@Component({...})
export class EmployeeFormComponent {
form:FormGroup;
ngOnInit() {
this.form = new FormGroup({
firstname: new FormControl('', Validators.required),
email: new FormControl('',
[Validators.required, Validators.minLength(2)]),
});
}
}