{
    "rules":{
        "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": "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 telephone=@telephone {s-if:userId} and user_id<>@userId {e-if:userId} ",
            "isAdd": true,
            "isEdit": true,
            "message": "【手机号码】已存在。"
          }
        ],
    }
}
文档更新时间: 2022-02-15 18:16   作者:admin