Posted on 2005-04-05
I'm doing some validation in a page and the following is working to check that the user enters is text, characters only.
What i want is that it can also allow for the OPTION of checking for a space or hiphen -
For example an option in the instance of someone having two names, i.e Mary Jane or Mary-Jane
Is this possible as an option, or would it be implemented as mandatory?
var pattern = /^([a-zA-Z])$/g
alert("Please enter your Firstname");