Changeset 25786


Ignore:
Timestamp:
Dec 4, 2013, 10:03:45 PM (10 years ago)
Author:
mistic100
Message:

fix email validation

Location:
extensions/GuestBook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/GuestBook/include/functions_comment.inc.php

    r24889 r25786  
    7373  {
    7474    $comm['email'] = $user['email'];
     75  }
     76  else if ( empty($comm['email']) and $conf['comments_email_mandatory'] )
     77  {
     78    array_push($page['errors'], l10n('mail address must be like xxx@yyy.eee (example : jack@altern.org)'));
     79    $comment_action='reject';
    7580  }
    7681  else if ( !empty($comm['email']) and !email_check_format($comm['email']) )
  • extensions/GuestBook/template/guestbook.tpl

    r25215 r25786  
    88{/if}
    99
    10 {if $add_comment.EMAIL_MANDATORY and (!$add_comment.IS_LOGGED or empty($add_comment.EMAIL))}
     10{if $comment_add.EMAIL_MANDATORY and (!$comment_add.IS_LOGGED or empty($comment_add.EMAIL))}
    1111var email = new LiveValidation('email', {ldelim} onlyOnSubmit: true });
    1212email.add(Validate.Presence, {ldelim} failureMessage: "{'Please enter your e-mail'|@translate}" });
Note: See TracChangeset for help on using the changeset viewer.