jQuery Validate ajax 后台验证

    xiaoxiao2021-04-01  35

    标签配置

    data-rule="required;remote[get:comp/tDevicetype/existDevice];"

    Ajax请求(返回的字符串为提示信息)

    @Log(description = "验证设备标示是否已经在系统中存在") @RequestMapping(value="/existDevice",method=RequestMethod.GET) @ResponseBody public String existDevice( @PathParam(required = true) String device) { boolean isExist = tDevicetypeService.selectByDevice(device).size() == 0; return isExist?"":"该设备标示已存在"; }
    转载请注明原文地址: https://ju.6miu.com/read-665492.html

    最新回复(0)