-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
ng-alain/delon
#1083Labels
Description
Reproduction link
https://stackblitz.com/edit/ng-alain-setup
Steps to reproduce
问题出现在Schema的条件类错误。
表单提交时,我type选择的mobile,此时 'name', 'pwd' 应该是可以不填,而它提示必填
schema: SFSchema = {
properties: {
type: { type: 'string', enum: [ 'mobile', 'name' ], default: 'mobile' },
name: { type: 'string' },
pwd: { type: 'string' },
mobile: { type: 'string' },
code: { type: 'string' }
},
required: [ 'type' ],
if: {
properties: { type: { enum: [ 'mobile' ] } }
},
then: {
required: [ 'mobile', 'code' ]
},
else: {
required: [ 'name', 'pwd' ]
}
};
What is expected?
在Schema的条件类错误。
表单提交时,我type选择的mobile,此时 'name', 'pwd' 应该是可以不填,而它提示必填
What is actually happening?
在Schema的条件类错误。
表单提交时,我type选择的mobile,此时 'name', 'pwd' 应该是可以不填,而它提示必填
Environment | Info |
---|---|
ng-alain | 10.1.2 |
Browser | 谷歌 |
重现链接、浏览器是我随便写的,我想说的问题出现在Schema的条件类错误。