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
type
number
exclusiveMinimum
https://stackblitz.com/edit/ng-alain-setup-e8nvss
动态表单中,type: 'number‘的动态属性使用exclusiveMinimum约束后表单的提交校验失效。 具体表现为:
type: 'number‘
enter
The text was updated successfully, but these errors were encountered:
这个问题恐怕 无法处理,原因是 sf 的实现机制导致无法很好的处理 type 类型的错误捕获,因此默认情况下 sf 是忽略了所有 type (见 config.ts)类型错误,这就是倒置为什么无法触发无效检查的原因。
sf
其实:
price: { title: '价格', type: 'number', description: '商品的单价', minimum: 0, // 添加此属性后,表单校验出现问题 exclusiveMinimum: true, }
等同于:
price: { title: '价格', type: 'number', description: '商品的单价', minimum: 1 }
Sorry, something went wrong.
@cipchk 是的,我是在按照API文档测试的时候发现的这个问题。是否可以在API文档中标注出来呢?
2fb0518
No branches or pull requests
重现链接 Reproduction link
https://stackblitz.com/edit/ng-alain-setup-e8nvss
重现步骤 Steps to reproduce
动态表单中,
type: 'number‘
的动态属性使用exclusiveMinimum
约束后表单的提交校验失效。具体表现为:
enter
键可以触发提交The text was updated successfully, but these errors were encountered: