@ApiOperation("Validator使用:字段验证器")
@GetMapping("/validator")
public CommonResult validator(){
//判断是否为邮箱地址
boolean result = Validator.isEmail("wangnaixing@qq.com");
LOGGER.info("Validator isEmail:{}",result);
//判断是否为手机号码
result = Validator.isMobile("18154622909");
LOGGER.info("Validator isMobile:{}",result);
//判断是否为IPV4地址
result = Validator.isIpv4("192.168.3.101");
LOGGER.info("Validator isIpv4:{}",result);
//判断是否为汉字
result = Validator.isChinese("你好");
LOGGER.info("Validator isChinese:{}",result);
//判断是否为身份证号(18位中国)
result = Validator.isCitizenId("123456");
LOGGER.info("Validator isCitizenId:{}",result);
//判断是否为URL
result = Validator.isUrl("http://www.baidu.com");
LOGGER.info("Validator isUrl:{}",result);
//判断是否为生日
result = Validator.isBirthday("2020-12-14");
LOGGER.info("Validator isBirthday:{}",result);
return CommonResult.success(null,"操作成功!");
}