I have create a test for the contact module that checks just about everything.

The only question that I have is to the validity of the valid_email_address function in common.inc

It returns the following e-mail addresses as valid:

  • invalid@site
  • invalid@site.

Both of which I don't think are valid, but maybe I am mistaken.

A possible solution could be to change the regular expression, maybe something like: ^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$.
Found at: http://www.regular-expressions.info/email.html.

CommentFileSizeAuthor
contact_module.test_.txt10.34 KBboombatower

Comments

boombatower’s picture

Status: Needs review » Fixed

Committed.

I will leave the two e-mail address in there in hopes that the e-mail validation is fix: http://drupal.org/node/214114.

If not than this test can easily be patched.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.