Strip whitespace from email address before validating
This commit is contained in:
@@ -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));
|
||||
|
Reference in New Issue
Block a user