We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.25.2
3.2.31
chrome 98.0.4758.102
macos 12.1
https://codesandbox.io/s/hungry-silence-qo0xpp?file=/src/Demo.vue
期望在 validator callback中value为 undefined 时,不要默认 null
undefined
null
https://github.com/TuSimple/naive-ui/blob/main/src/form/src/FormItem.tsx#L264
如上代码,在使用 lodash 获取 path value的时候这里做了默认null 的操作
不确定这里故意默认 null 的原因,会导致实际的表单数据和这里不一致,一些数据校验不符合预期
The text was updated successfully, but these errors were encountered:
你说的非常有道理,当时应该就是没考虑那么多,写错了
然后主要就是我不知道 lodash 会这么处理,以为是有 key 就会返回 key 的,没有 key 才会 fallback
Sorry, something went wrong.
f97b750
fix(form): when model.xxx is undefined, validator will use null…
model.xxx
4b138b4
… as validation value, closes tusen-ai#2486
No branches or pull requests
TuSimple/naive-ui version (版本)
2.25.2
Vue version (Vue 版本)
3.2.31
Browser and its version (浏览器及其版本)
chrome 98.0.4758.102
System and its version (系统及其版本)
macos 12.1
Node version (Node 版本)
Reappearance link (重现链接)
https://codesandbox.io/s/hungry-silence-qo0xpp?file=/src/Demo.vue
Reappearance steps (重现步骤)
Expected results (期望的结果)
期望在 validator callback中value为
undefined
时,不要默认null
Actual results (实际的结果)
https://github.com/TuSimple/naive-ui/blob/main/src/form/src/FormItem.tsx#L264
如上代码,在使用 lodash 获取 path value的时候这里做了默认
null
的操作Remarks (补充说明)
不确定这里故意默认
null
的原因,会导致实际的表单数据和这里不一致,一些数据校验不符合预期The text was updated successfully, but these errors were encountered: