I'm trying to validate a password input of a user using php. Now I'm trying to require the user to put at least 6 chars. it doesn't matter if it's all letters or digits or any other language chars. In fact I want it to accept special chars from different languages... so I decided not to change the string expressing but limit the length of it I used this code
public function validpassword($value,$fields = NULL ,$reports = NULL){
global $reports;
if(preg_match($value, "/{6,24}/")){
return $value;
}else{
$reports[] = $fields.": 6-24 chars limit";
return false;
}
}
it doesn't really work. can you help me with that please. i've been looking over the web i can't seem to find something.