Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(form): remove validateMessage add setValidateMessage #479

Merged
merged 4 commits into from
Mar 3, 2022

Conversation

dellyoung
Copy link
Contributor

@dellyoung dellyoung commented Mar 2, 2022

关于validateMessage

  • 去掉validateMessage属性
  • 新增setValidateMessage方法:可通过setValidateMessage设置自定义校验结果

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2022

完成

@dellyoung dellyoung changed the title fix: watch validateMessage feat: remove validateMessage add setValidateMessage Mar 3, 2022
@dellyoung dellyoung changed the title feat: remove validateMessage add setValidateMessage feat(form): remove validateMessage add setValidateMessage Mar 3, 2022
@chaishi chaishi merged commit c2048b5 into Tencent:develop Mar 3, 2022
const list = this.children
.filter((child) => this.isFunction(child.setValidateMessage) && keys.includes(child.name))
.map((child) => child.setValidateMessage(validateMessage[child.name]));
Promise.all(list);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 Primise.all 没看懂,直接forEach就好了啊

this.children
        .filter((child) => this.isFunction(child.setValidateMessage) && keys.includes(child.name))
        .forEach((child) => child.setValidateMessage(validateMessage[child.name]));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants