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

u-form-item 支持自定义校验对象 #1292

Open
P2K0 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #1293
Open

u-form-item 支持自定义校验对象 #1292

P2K0 opened this issue Feb 1, 2024 · 0 comments · May be fixed by #1293

Comments

@P2K0
Copy link

P2K0 commented Feb 1, 2024

这个功能解决了什么问题?

解决自定义对象校验

在某些业务场景下 我想对校验 "name" 不为空

例子:
现在有组数据
const data = { model: { userList: [ { name: "张三", age: 2 }, { name: "", age: 3 } ] } };

你期望的 API 是怎样的?

通过对 u-form-item 传入一个 target 从而让它从 model => target 实现校验

P2K0 added a commit to P2K0/uView that referenced this issue Feb 1, 2024
@P2K0 P2K0 linked a pull request Feb 1, 2024 that will close this issue
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 a pull request may close this issue.

1 participant