Check Email Address with JavaScript and Regular Expressions

A while ago I put up a Password Strength Checker using JavaScript and Regular Expressions. On that same note, you can also check the structure of an email address utilizing the same regular expression (regex) methodology. If your form element has the id=”emailaddress” and you add a form onSubmit=”return checkEmail();“, this is a Javascript function that you can utilize to return an alert if the email address has a valid structure or not: <script language="javascript">

Check Password Strength with JavaScript and Regular Expressions

Tonight I was doing some research on finding a good example of a Password Strength checker that uses JavaScript and Regular Expressions. In the application at my work, we do a post back to verify the password strength and it’s quite inconvenient for our users. I found one example of some great Regular Expressions that look for a combination of length, characters and symbols, but the code was a little excessive for my taste and

Valid Email Address Length

I had to do some digging today to find it, but did you know what the valid length of an email address is? It’s actually broken into parts… Name@Domain.com. This is according to RFC2822. Name can be 1 to 64 characters. Domain can be 1 to 255 characters. Wow… that means that this could be a valid email address: loremaipsumadolorasitaametbaconsectetueraadipiscin gaelitanullamc@loremaipsumadolorasitaametbaconsect etueraadipiscingaelitcaSedaidametusautanisiavehicu laaluctuscaPellentesqueatinciduntbadiamaidacondimn tumarutrumbaturpisamassaaconsectetueraarcubaeuatin ciduntaliberoaaugueavestibulumaeratcaPhasellusatin ciduntaturpisaduis.com Try fitting that on a business card! Ironically, most