- { }占位符,对应columns里面title
remote模式
"telephone": [
//{
// "type": "loadPswd",
// "max": 11,
// "isEdit": true,
// "isAdd": true,
// "message": "【手机号码】格式不正确。"
//},
{
"type": "maxlength",
"max": 11,
"isEdit": true,
"isAdd": true,
"message": "【手机号码】最大长度为11。"
},
{
"type": "mobile",
"max": 11,
"isEdit": true,
"isAdd": true,
"message": "【手机号码】格式不正确。"
},
{
"type": "remote", //remote db 远程验证 rule 和 sql必须填写; db:sql必须填写
"url": "~/bo/api/v3/remote/unique/{mkey}/{resField}?ownerId={ownerId}&sysId={sysId}&rule={rule}&{params}",
"sql": "select count(telephone) from bo_user where telephone=@telephone {s-if:userId} and user_id<>@userId {e-if:userId} ",
"isAdd": true,
"isEdit": true,
"message": "【手机号码】已存在。"
}
],
db模式
\RG3.Web.Host.PaaS\Config\Mapper\basis\boapp\mapper_bo-app-config-setting_sql__rules.json
{
"rules": {
"settingId": [
{
"type": "required",
"required": true,
"isAdd": true,
"isEdit": true,
"message": "【{setting_id}】值必须填写。"
},
{
"type": "maxlength",
"required": false,
"isAdd": true,
"isEdit": true,
"max": 50,
"message": "【{setting_id}】值最大长度为50。"
},
{
"type": "db", //remote db 远程验证 rule 和 sql必须填写; db:sql必须填写
"url": "~/bo/api/v3/remote/unique/{mkey}/{resField}?ownerId={ownerId}&sysId={sysId}&rule={rule}&{params}",
"sql": "select count(telephone) from bo_user where setting_id=@settingId",
"isAdd": true,
"isEdit": false,
"message": "【应用配置】已存在,可进入修改页面进行内容修改。"
}
]
}
}
文档更新时间: 2023-05-21 13:23 作者:admin