Im validating a form and its easy to validate numbers, letters a-z and so on but when i got to the point where i need to validate a field which must contain only the characters (a-z and special characters such as öçğüiş) with at least one space only I am really stuck!
I tried the following and some other techniques without success:
function validateAlphaSpecial($value) {
if (ereg("/^[\p{L}\s]+$/", $value, $regs)) {
echo 'true';
} else {
echo 'false';
}
}
Has anyone got a solution for this. Thank you.