• Interesting article, but I would note that the email address validation isn't the example I would have chosen.

    An actual RegEx to validate email per RFC822 is at http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html; it's significantly complex.

    Also, if the example is to transparently handle validation, then any password hashing must be handled at the client. Passwords should also be hashed, not encrypted, and many, many times; that's a whole separate article.