first commit
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
package com.greenorange.promotion.constant;
|
||||
|
||||
/**
|
||||
* 正则表达式常量
|
||||
*
|
||||
* @author <a href="https://xuande-hk.gitee.io">玄德</a>
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public interface RegexConstant {
|
||||
/**
|
||||
* 手机号正则
|
||||
*/
|
||||
String PHONE_REGEX = "^1[3-9]\\d{9}$";
|
||||
|
||||
/**
|
||||
* 邮箱正则
|
||||
*/
|
||||
String EMAIL_REGEX = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$";
|
||||
|
||||
/**
|
||||
* 18位身份证号正则
|
||||
*/
|
||||
String ID_CARD_REGEX = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9xX]$";
|
||||
|
||||
/**
|
||||
* 验证码正则, 6位数字或字母
|
||||
*/
|
||||
String VERIFY_CODE_REGEX = "^[a-zA-Z\\d]{6}$";
|
||||
|
||||
/**
|
||||
* 密码正则。4~32位的字母、数字、下划线
|
||||
*/
|
||||
String PASSWORD_REGEX = "^\\w{4,32}$";
|
||||
}
|
Reference in New Issue
Block a user