Uses of Class
com.luna.common.regex.ValidateException
-
Uses of ValidateException in com.luna.common.regex
Modifier and TypeMethodDescriptionstatic void
Validator.validateBetween
(Number value, Number min, Number max, String errorMsg) 检查给定的数字是否在指定范围内static <T extends CharSequence>
TValidator.validateBirthday
(T value, String errorMsg) 验证验证是否为生日static <T extends CharSequence>
TValidator.validateCarDrivingLicence
(T value, String errorMsg) 验证是否为驾驶证 别名:驾驶证档案编号、行驶证编号static <T extends CharSequence>
TValidator.validateCarVin
(T value, String errorMsg) 验证是否为车架号;别名:行驶证编号 车辆识别代号 车辆识别码static <T extends CharSequence>
TValidator.validateChinese
(T value, String errorMsg) 验证是否为汉字static <T extends CharSequence>
TValidator.validateCitizenIdNumber
(T value, String errorMsg) 验证是否为身份证号码(支持18位、15位和港澳台的10位)static <T extends CharSequence>
TValidator.validateEmail
(T value, String errorMsg) 验证是否为可用邮箱地址static <T> T
Validator.validateEmpty
(T value, String errorMsg) 验证是否为空,非空时抛出异常
对于String类型判定是否为empty(null 或 "")static Object
Validator.validateEqual
(Object t1, Object t2, String errorMsg) 验证是否相等,不相等抛出异常static boolean
Validator.validateFalse
(boolean value, String errorMsgTemplate, Object... params) 检查指定值是否为false
static <T extends CharSequence>
TValidator.validateGeneral
(T value, int min, int max, String errorMsg) 验证是否为给定长度范围的英文字母 、数字和下划线static <T extends CharSequence>
TValidator.validateGeneral
(T value, int min, String errorMsg) 验证是否为给定最小长度的英文字母 、数字和下划线static <T extends CharSequence>
TValidator.validateGeneral
(T value, String errorMsg) 验证是否为英文字母 、数字和下划线static <T extends CharSequence>
TValidator.validateGeneralWithChinese
(T value, String errorMsg) 验证是否为中文字、英文字母、数字和下划线static <T extends CharSequence>
TValidator.validateHex
(T value, String errorMsg) 验证是否为Hex(16进制)字符串static <T extends CharSequence>
TValidator.validateIpv4
(T value, String errorMsg) 验证是否为IPV4地址static <T extends CharSequence>
TValidator.validateIpv6
(T value, String errorMsg) 验证是否为IPV6地址static <T extends CharSequence>
TValidator.validateLetter
(T value, String errorMsg) 验证是否全部为字母组成,包括大写和小写字母和汉字static <T extends CharSequence>
TValidator.validateLowerCase
(T value, String errorMsg) 验证字符串是否全部为小写字母static <T extends CharSequence>
TValidator.validateMac
(T value, String errorMsg) 验证是否为MAC地址static <T extends CharSequence>
TValidator.validateMatchRegex
(String regex, T value, String errorMsg) 通过正则表达式验证
不符合正则抛出ValidateException
异常static <T extends CharSequence>
TValidator.validateMobile
(T value, String errorMsg) 验证是否为手机号码(中国)static <T extends CharSequence>
TValidator.validateMoney
(T value, String errorMsg) 验证是否为货币static <T> T
Validator.validateNotEmpty
(T value, String errorMsg) 验证是否为非空,为空时抛出异常
对于String类型判定是否为empty(null 或 "")static void
Validator.validateNotEmptyAndEqual
(Object t1, Object t2, String errorMsg) 验证是否非空且与指定值相等
当数据为空时抛出验证异常
当两值不等时抛出异常static void
Validator.validateNotEmptyAndNotEqual
(Object t1, Object t2, String errorMsg) 验证是否非空且与指定值相等
当数据为空时抛出验证异常
当两值相等时抛出异常static void
Validator.validateNotEqual
(Object t1, Object t2, String errorMsg) 验证是否不等,相等抛出异常static <T> T
Validator.validateNotNull
(T value, String errorMsgTemplate, Object... params) 检查指定值是否非null
static <T> T
Validator.validateNull
(T value, String errorMsgTemplate, Object... params) 检查指定值是否为null
static String
Validator.validateNumber
(String value, String errorMsg) 验证是否为数字static <T extends CharSequence>
TValidator.validatePlateNumber
(T value, String errorMsg) 验证是否为中国车牌号static boolean
Validator.validateTrue
(boolean value, String errorMsgTemplate, Object... params) 检查指定值是否为true
static <T extends CharSequence>
TValidator.validateUpperCase
(T value, String errorMsg) 验证字符串是否全部为大写字母static <T extends CharSequence>
TValidator.validateUrl
(T value, String errorMsg) 验证是否为URLstatic <T extends CharSequence>
TValidator.validateUUID
(T value, String errorMsg) 验证是否为UUID
包括带横线标准格式和不带横线的简单模式static <T extends CharSequence>
TValidator.validateWord
(T value, String errorMsg) 验证是否为字母(包括大写和小写字母)static <T extends CharSequence>
TValidator.validateZipCode
(T value, String errorMsg) 验证是否为邮政编码(中国)