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

formbinder 动态修改validator时不更新校验规则 #1250

Closed
feedcollision opened this issue Jan 3, 2019 · 1 comment
Closed

formbinder 动态修改validator时不更新校验规则 #1250

feedcollision opened this issue Jan 3, 2019 · 1 comment
Assignees

Comments

@feedcollision
Copy link

环境信息

  • 操作系统:mac&windows
  • Iceworks 版本: 2.13.0

问题描述

当formbinder的validator动态变化时,实际生效的validator不更新

https://github.com/alibaba/ice/blob/master/react-materials/components/form-binder/src/FormBinder.jsx
应该是上方文件中120行
JSON.stringify(nextRules) !== JSON.stringify(this.rules)
中对对象中的函数不做JSON.stringify导致未更新

预期能够动态更新validator

错误信息

@jasonintju
Copy link
Contributor

@feedcollision
@ice/form 组件已支持 rules 的动态更新,可以试用一下

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

No branches or pull requests

3 participants