Form validation with the server

前端 未结 1 1190
隐瞒了意图╮
隐瞒了意图╮ 2021-01-25 09:31

I have a form that I would like to perform http validation by checking if an email exists but it returns an error. This is my form:

On the form component



        
相关标签:
1条回答
  • 2021-01-25 09:46

    https://angular.io/docs/ts/latest/api/forms/index/FormBuilder-class.html

    async validators is the 3rd parameter

    email:['', [Validators.required], [
      this._validationService.emailExistsValidator.bind(this)
    ]]
    
    0 讨论(0)
提交回复
热议问题