I'm practicing my beginner php skills and would like to know why this script always returns FALSE?
What am i doing wrong?
$namefields = '/[a-zA-Z\s]/';
$value = 'john';
if (!filter_var($value,FILTER_VALIDATE_REGEXP,$namefields)){
$message = 'wrong';
echo $message;
}else{
$message = 'correct';
echo $message;
}