first commit

This commit is contained in:
2025-04-01 11:48:31 +08:00
commit fcebd8474e
49 changed files with 2804 additions and 0 deletions

View File

@ -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}$";
}