#1 2003-11-19 14:11:48

Adam
Guest

Mailadress

Hi!

When i try to enter my admin contact mailadress, i get a error when typing in a .SE adr
is it limited so that only.COM will work?


By the way, great program

//Adam

 

#2 2003-11-21 20:11:19

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
14068

Re: Mailadress

Code:

// validate_mail_address verifies whether the given mail address has the
// right format. ie someone@domain.com "someone" can contain ".", "-" or
// even "_". Exactly as "domain". The extension doesn't have to be
// "com". The mail address can also be empty.
// If the mail address doesn't correspond, an error message is returned.
function validate_mail_address( $mail_address )
{
  global $lang;

  if ( $mail_address == '' )
  {
    return '';
  }
  $regex = '/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)*\.[a-z]+$/';
  if ( !preg_match( $regex, $mail_address ) )
  {
    return $lang['reg_err_mail_address'];
  }
}

OK, so it means : try without capital letters, it should work

Offline

 

Board footer

Powered by FluxBB