Hi, I have this function function validate_name($name) { if(ereg("^[a-zA-Z0-9_]{2,30}$", $name)) { return true; } else { return false; } } If i enter a name like John for exemple everything is ok but if i enter John Doe the function return false. Where is the problem? Thanks