Updated regex to check username
Updated string length check