Im using jquery for the name validation I have tried a code which is given below
$(\"#contactname\").keypress(function(e) { if(e.which < 97 /* a */ || e.w
Can you use the HTML5 attribute pattern? See the MDN article on it for more information.
pattern
Using a regex of ^[a-zA-Z][\sa-zA-Z]* seems to cover your requirements.
^[a-zA-Z][\sa-zA-Z]*
So something like:
Username: