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

dependencies 支持正则匹配 #23439

Closed
1 task
guaijie opened this issue Apr 21, 2020 · 5 comments
Closed
1 task

dependencies 支持正则匹配 #23439

guaijie opened this issue Apr 21, 2020 · 5 comments
Labels
Inactive 🙅🏻‍♀️ WON'T DO We won't do it, it not in our plan.

Comments

@guaijie
Copy link

guaijie commented Apr 21, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

解决依赖多个其他表单项时,触发自动校验 例如: dependencies={['field','*']} 满足namePath的所有表单项变化都将触发改表单项重新校验

What does the proposed API look like?

dependencies={['field',new RegExp()]}

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 26, 2020

一般情况下,表单互相有关联的字段都是个别,支持正则的必要性感觉没那么大。

@guaijie
Copy link
Author

guaijie commented Apr 27, 2020

但不可否人在某些情况需要他,比如处理表格中的表单字段,每一列字段名都是一样的但为了区分,需要给表单 name 拼接成唯一一个标识name=[id, filedName]

@yoyo837
Copy link
Contributor

yoyo837 commented Apr 27, 2020

表单项的name 本身就必须唯一,否则功能会有问题。

@guaijie
Copy link
Author

guaijie commented May 7, 2020

所以正则在这里就有意义了

@afc163
Copy link
Member

afc163 commented Jul 1, 2022

不会支持这么复杂的匹配。

@afc163 afc163 closed this as completed Jul 1, 2022
@afc163 afc163 added the 🙅🏻‍♀️ WON'T DO We won't do it, it not in our plan. label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Inactive 🙅🏻‍♀️ WON'T DO We won't do it, it not in our plan.
Projects
None yet
Development

No branches or pull requests

4 participants