Con questa funzione,
function nome(stringa)
{
if (stringa.search(/^\w+( \w+)?$/) != -1)
return true;
else
return false;
}
se nel campo inserisco più di due parole mi ritorna false, perchè?
Come posso rimediare?
Grazie
Con questa funzione,
function nome(stringa)
{
if (stringa.search(/^\w+( \w+)?$/) != -1)
return true;
else
return false;
}
se nel campo inserisco più di due parole mi ritorna false, perchè?
Come posso rimediare?
Grazie