preg_match不区分大小写,无法注册

时间:2019-04-05 06:19:02

标签: php preg-match

尝试验证注册页面,不区分大小写。

if(preg_match('[^a-z]', substr($username, 0, 1)))
        $errors['username']['start_type'] = ' Username must begin with a letter. Please try again.'; 

if(preg_match('[^a-z]', substr($username, 0, 1)))
        $errors['username']['start_type'] = ' Username must begin with a letter. Please try again.';

0 个答案:

没有答案