{
    "rules":{        
        "idCard": [
          {
            "type": "maxlength",
            "max": 36,
            "isAdd": true,
            "isEdit": true,
            "message": "【身份证】最大长度为36。"
          },
          {
            "type": "idcard",
            "max": 36,
            "isAdd": true,
            "isEdit": true,
            "message": "【身份证】格式不正确。"
          },
          {
            "type": "db", //验证身份证号
            "url": "~/bo/api/v3/remote/unique/{mkey}/{resField}?ownerId={ownerId}&sysId={sysId}&rule={rule}&{params}",
            "sql": "select count(id_card) from bo_user where id_card=@idCard {s-if:userId} and user_id<>@userId {e-if:userId} ",
            "isAdd": true,
            "isEdit": true,
            "message": "【身份证】已存在。"
          }
        ],
    }
}
文档更新时间: 2022-02-15 18:07   作者:admin