From a489b023d9ca2a24dfe82d05f19cac8718aa5c13 Mon Sep 17 00:00:00 2001
From: lizijie <lzjiiie@163.com>
Date: Thu, 15 Apr 2021 11:38:09 +0800
Subject: [PATCH] 添加查询菜单列表功能
---
screen-common/src/main/java/com/moral/util/RegexUtils.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/screen-common/src/main/java/com/moral/util/RegexUtils.java b/screen-common/src/main/java/com/moral/util/RegexUtils.java
index 3f2b70b..62aafc1 100644
--- a/screen-common/src/main/java/com/moral/util/RegexUtils.java
+++ b/screen-common/src/main/java/com/moral/util/RegexUtils.java
@@ -12,9 +12,11 @@
* @return ���������������true���������������������false
*/
public static boolean checkAccount(String account) {
- String regex = "[a-zA-Z]\\w{3,19}";
+ String regex = "[a-zA-Z]\\w{2,19}";
return account.matches(regex);
}
+
+
/**
* ������������
@@ -23,7 +25,7 @@
* @return ���������������true���������������������false
*/
public static boolean checkPassword(String password) {
- String regex = "[0-9a-zA-Z_]\\w{3,19}";
+ String regex = "[0-9a-zA-Z_]\\w{2,19}";
return password.matches(regex);
}
@@ -132,6 +134,18 @@
}
/**
+ * @Description: ������yyyy-MM-dd���������������������������
+ * @Param: [date]
+ * @return: boolean
+ * @Author: ���������
+ * @Date: 2021/3/23
+ */
+ public static boolean checkDate(String date){
+ String regex = "((\\d{2}(([02468][048])|([13579][26]))[\\-]((((0?[13578])|(1[02]))[\\-]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-]((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-]((((0?[13578])|(1[02]))[\\-]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-]((0?[1-9])|(1[0-9])|(2[0-8]))))))";
+ return Pattern.matches(regex,date);
+ }
+
+ /**
* ������URL������
*
* @param url ���������http://blog.csdn.net:80/xyang81/article/details/7705960? ��� http://www.csdn.net:80
--
Gitblit v1.8.0