checking for a space in a string
Posted: Tue Jun 06, 2006 4:53 am
Hi
I want to prevent my users signing up to my site with a username that includes a space in it e.g 'name surname' should not be allowed only 'namesurname' or 'name_surname'.
How could I validate that an entered username does not include any spaces and return an error if it is unvalid?
thanks in advance
I want to prevent my users signing up to my site with a username that includes a space in it e.g 'name surname' should not be allowed only 'namesurname' or 'name_surname'.
How could I validate that an entered username does not include any spaces and return an error if it is unvalid?
thanks in advance