I'm not a regex guy, so I definitely need help on this.
All I want is to have a regular expression to validate if the user inputted on "username" will contain no spaces.
Currently, I have this structure:
if($('.username').val().length < 5) {
$(".user_account_validation").html("Too shorty.").css('background-color', 'red');
} else if() {
}
As you can notice my else if() is still empty, and in that I want to place my validation. If the username has space I'll return a corresponding error message. Thanks!