My form validation is currently based on ReactiveFormsModule, structured like this. Although I have multiple validators for each field, the process is quite repetitive.
constructor(private builder: FormBuilder) {
this.form = builder.group({
"firstName": ["", [Validators.required, Validators.minLength(3)]],
"lastName": ["", [Validators.required, Validators.minLength(3)]]
});
}
I find it unnecessarily lengthy and am curious if there's a more streamlined approach to consolidate all the validators into one single instance somehow.