diff --git a/booking.helper.inc b/booking.helper.inc index e6eec81..6b9fe6b 100644 --- a/booking.helper.inc +++ b/booking.helper.inc @@ -5,6 +5,10 @@ * Helper function to perform some validity checking of email addresses */ function _valid_email_address($email) { + + //strip any leading or trailing whitespace + $email = trim($email); + //firstly use the built-in function to validate the format if (! valid_email_address($email)) { watchdog('booking', "Drupal validation of email address '!email' returns false.", array('!email' => $email));