It's a 8 alphanumeric characters string validation.
Why doesnt it work?
Code: Select all
function _check_valid_hash($hash){
$hash = strtolower($hash);
if (preg_match("#[a-z0-9]*8#",$hash)){
return true;
}else{
return false;
}
}EDIT:
Ok, i checked some regex docs more carefuly
Code: Select all
preg_match("|^[a-z0-9]{8}$|",$hash);