these are the conditions for a valid username
- must contain a-z or A-Z
- can contain 0-9 anywhere
- must not allow any other characters
so a0
and 0a
are valid user names just like username
and UserName
. i need a regex for this.
the issue optionally allowing 0-9
UPDATE
the problem with regex like /\w+/i
is it allows username like 000
but in my case it must contain an alphabet and not any special characters