Form Validation error expected validator to return Promise or Observable


I have a problem with the validator on form

template: `

Email password Submit `
this.userForm ={
     email: ['', Validators.required, Validators.minLength(5)],
     password: ['', Validators.required],

when i fill the email the problem is: Form Validation error expected validator to return Promise or Observable:
Any suggest ? thanks


@siriocarino if you never go a solution you fix it by passing Validators to Validators.compose as an array

email: ['', Validators.compose([Validators.required, Validators.minLength(5)]),


I have this exact problem and Validators.compose doesn’t help :confused:


Validators.compose() is redundant; you can just pass an array. OP’s problem is caused by failure to wrap the validators in [] to make them an array, hence the minLength() one is assumed to be async and the resulting error message.


U know, I just created an account to like ur comment. Thanks a lot!


great answer! this fixed my issue


Just to be clear it needs to be email: [’’, [Validators.required, Validators.minLength(5)]],


haha i have done the same thing


i hve place my two validations like [Validators.required,] then it worked


forma correcta
this.userForm ={
email: [’ ‘, [Validators.required, Validators.minLength(5)]],
password: [’’, Validators.required],


@rapropos thanks, that saved the me a lot of debugging time,