关于Form_validation表单验证的问题
$this->form_validation->set_rules('aa', '', 'valid_email|regex_match[/^\d{6,15}$/]');我想将规则变为'或'的逻辑形式 怎么写啊
function _check($str){
//valid_email|regex_match[/^\d{6,15}$/]
if ($this->form_validation->valid_email($str)||$this->form_validation->regex_match($str,'/^\d{6,15}$/')){
return TRUE;
}else{
$this->form_validation->set_message('check', 'The %s woring');
return FALSE;
}
}
我写了个自定义验证
求规范写法
页:
[1]