描述
判断传入的字符串 是否符合特定的格式(非空 、手机号、验证固定电话、日期、邮箱、身份证号、姓名、验证英文名、邮编、验证出生日期、数字、小数点后两位的数字 、护照、企业姓名、企业证件号、台湾居民来往大陆通行证,港澳同胞回乡证、校验军官证、校验出生证明、校验港澳台居民居住证)
代码
FieldValidationUtil.java
1 | package com.common.utils.register; |
ValidationPropertiesUtil.java
1 | package com.common.utils.register; |
validation.properties
1 | #手机号码校验规则 |
Test.java
1 | package com.common.utils.register; |