如何在不沉默孩子自己的验证器的情况下以角度向子窗体控件添加错误

问题描述

this.form = this.fb.array([
  this.fb.group({ 
    username: [null,Validators.required]
  }),this.fb.group({ 
    username: [null,...
],uniqueUsernameValidator)

const uniqueUsernameValidator = control => {
  // find duplicate
  
  // when flagging the error
  control.get('0.username').setErrors(ifThereIsAnError) // where `ifThereIsAnError` could be null
}

某种程度上,uniqueUsernameValidator正在使子表单字段指定的required验证静音。如何解决这个问题?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)