if (preg_match('/^[a-záéíóúñ\ ]{4,20}$/i', $nombre_ingresado)) { $error_nombres1="error nombres"; $error_stop=1; }