* adjust for account rule.

This commit is contained in:
wangyidong
2015-04-28 15:34:31 +08:00
parent 54c34ab691
commit 23d76509ae
2 changed files with 3 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ $config->methodVar = 'f'; // requestType=GET: the method var nam
$config->viewVar = 't'; // requestType=GET: the view var name.
$config->sessionVar = 'sid'; // requestType=GET: the session var name.
$config->allowedTags = '<p><span><h1><h2><h3><h4><h5><em><u><strong><br><ol><ul><li><img><a><b><font><hr><pre><div><table><td><th><tr><tbody><embed><style>';
$config->accountRule = '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|';
/* Supported views. */
$config->views = ',html,json,mhtml,';

View File

@@ -213,7 +213,8 @@ class validater
*/
public static function checkAccount($var)
{
return self::checkREG($var, '|^[a-zA-Z0-9_]{1}[a-zA-Z0-9_\.]{1,}[a-zA-Z0-9_]{1}$|');
global $config;
return self::checkREG($var, $config->accountRule);
}
/**