uView icon indicating copy to clipboard operation
uView copied to clipboard

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

Open P2K0 opened this issue 5 months ago • 0 comments

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

解决自定义对象校验

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

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

你期望的 API 是怎样的?

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

P2K0 avatar Feb 01 '24 09:02 P2K0