I am a complete beginner to javascript and I have several things I need to correct on a form in order for it to work. I have to make sure it doesn't reject any valid names (names with accents, hyphens, names with spaces between them). At the moment my regular expression is -
var alphabetic = /^[a-zA-Z]+$/;
if ((alphabetic.test(fname)== false) || (alphabetic.test(lname)== false))
{
alertmsg = alertmsg + "Name should be in alphabets:" + "\n";
}
If someone could point me in the right direction, I would be very grateful