Hi I am trying to use javascript to find if a string contains only alphabets and no other character such as dot, backslash but getting nowhere.
I thought the carat negated the result but it still is not working.
function checkform()
{
var firstName = document.csupport.firstname2.value;
var fnamefilter = /([a-zA-Z])+[^.]/;
if ( fnamefilter.test(firstName))
{
alert("Success");
}else{
alert('Please enter correct email address');
}
}
I thought the carat negated the result but it still is not working.
function checkform()
{
var firstName = document.csupport.firstname2.value;
var fnamefilter = /([a-zA-Z])+[^.]/;
if ( fnamefilter.test(firstName))
{
alert("Success");
}else{
alert('Please enter correct email address');
}
}