Experts,

In Reactive Form in Angular6, is it possible to pass different validation
style (when to validate) for different formControls inside the same
FormGroup?

E.g. I want something like this:


myform = new FormGroup({

   ctrl1: new FormControl('', [validators]);
   ctrl2: new FormControl('', [validators]);
   ctrl3: new FormControl('', [validators]);
},
{
  validate: onSubmit,
}

What I want is that: ctrl2 would be validated on onBlur whereas ctrl1 and
ctrl3 will be validated on onSubmit.

How can I achieve this?


TIA,
Pradip

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to