From 4be2904f3688c07e0e9793414bda33ae1f85f565 Mon Sep 17 00:00:00 2001
From: chengkun <chengkun@ishangstudy.com>
Date: Wed, 28 May 2025 18:41:16 +0800
Subject: [PATCH] 提交
---
app/include/public.function.php | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/app/include/public.function.php b/app/include/public.function.php
index 0c29416..4c22719 100644
--- a/app/include/public.function.php
+++ b/app/include/public.function.php
@@ -16,6 +16,11 @@
}
}
+/**
+ * @desc 检测用户名格式
+ * @param $str
+ * @return bool
+ */
function CheckRegUser($str) {
if (!preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9\-@#.\$_!]+$/u", $str)) {
return FALSE;
@@ -24,6 +29,11 @@
}
}
+/**
+ * 检测电话号码
+ * @param $str
+ * @return bool
+ */
function CheckTell($str) {
if (preg_match("/^[0-9-]+?$/", $str) == 0) {
return FALSE;
--
Gitblit v1.9.0