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

自定义校验规则校验一直不通过 #125

Open
a847244052 opened this issue Feb 26, 2024 · 1 comment
Open

自定义校验规则校验一直不通过 #125

a847244052 opened this issue Feb 26, 2024 · 1 comment

Comments

@a847244052
Copy link

a847244052 commented Feb 26, 2024

选项1和选项2对应两个不同输入框,分别定义了校验规则,都是不通过

image
image
image
image

json:

[
{
"type": "FcRow",
"children": [
{
"type": "col",
"props": {
"span": 12
},
"children": [
{
"type": "select",
"field": "Frf8622qi89yz",
"title": "选择器",
"info": "",
"props": {
"_optionType": 2
},
"options": [
{
"value": "1",
"label": "选项1"
},
{
"value": "2",
"label": "选项2"
}
],
"_fc_drag_tag": "select",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "col",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "row",
"hidden": false,
"display": true
},
{
"type": "FcRow",
"children": [
{
"type": "col",
"props": {
"span": 12
},
"children": [
{
"type": "radio",
"field": "F6h41okrd5njr8",
"title": "单选框",
"info": "",
"effect": {
"fetch": ""
},
"options": [
{
"value": "1",
"label": "选项1"
},
{
"value": "2",
"label": "选项2"
}
],
"_fc_drag_tag": "radio",
"hidden": false,
"display": true,
"$required": "aa",
"control": [
{
"value": "1",
"rule": [
"Fu2t1okrd6vken"
]
},
{
"value": "2",
"rule": [
"F4ci1okrgm993u"
]
}
]
},
{
"type": "FcRow",
"children": [
{
"type": "col",
"props": {
"span": 12
},
"children": [
{
"type": "input",
"field": "Fu2t1okrd6vken",
"title": "输入框",
"info": "value1",
"_fc_drag_tag": "input",
"hidden": false,
"display": true,
"$required": false,
"props": {
"type": "number",
"maxlength": null,
"minlength": null,
"clearable": false
},
"validate": [
{
"trigger": "change",
"mode": "len",
"message": "aaa",
"len": 3,
"type": "number"
}
]
}
],
"_fc_drag_tag": "col",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "row",
"hidden": false,
"display": true
},
{
"type": "FcRow",
"children": [
{
"type": "col",
"props": {
"span": 12
},
"children": [
{
"type": "input",
"field": "F4ci1okrgm993u",
"title": "输入框",
"info": "value2",
"props": {
"type": "number",
"showWordLimit": true,
"autofocus": true
},
"_fc_drag_tag": "input",
"hidden": false,
"display": true,
"$required": false,
"validate": [
{
"trigger": "blur",
"mode": "min",
"message": "最小值是1",
"min": 1,
"type": "number"
}
]
}
],
"_fc_drag_tag": "col",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "row",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "col",
"hidden": false,
"display": true
}
],
"_fc_drag_tag": "row",
"hidden": false,
"display": true
}
]

@a847244052 a847244052 changed the title 自定义校验规则校验一直补通过 自定义校验规则校验一直不通过 Feb 26, 2024
@xaboy
Copy link
Owner

xaboy commented Feb 29, 2024

input组件的value类型是string,需要选择string

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

No branches or pull requests

2 participants