임시 메일 테스트를 위해 @localhost 사용가능하도록

String static 함수 문제 해결
This commit is contained in:
2018-01-20 04:23:46 +09:00
parent 3aaf7c8328
commit 0df2484b8e
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -6,6 +6,6 @@ sammo
localhost
25
test
lemein
letmein
@localhost
*/
+2 -2
View File
@@ -154,7 +154,7 @@ class _String {
return $str;
}
function Fill($str, $maxsize, $ch) {
static function Fill($str, $maxsize, $ch) {
$size = strlen($str);
$count = ($maxsize - $size) / 2;
@@ -169,7 +169,7 @@ class _String {
return $string;
}
function Fill2($str, $maxsize, $ch='0') {
static function Fill2($str, $maxsize, $ch='0') {
$size = strlen($str);
$count = ($maxsize - $size);
+4 -1
View File
@@ -1,6 +1,6 @@
<?php
require_once(ROOT.W.F_FUNC.W.'class._String.php');
require_once(ROOT.W.E_LIB.W.'util.php');
class _Validation {
public static function CheckID($id) {
$len = strlen($id);
@@ -103,6 +103,9 @@ class _Validation {
}
public static function CheckEmail($email) {
if(util::ends_with($email, '@localhost')){
return 0;
}
if(!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) {
return 1;
} else {