This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Error with email addresses containing a '


  1. ROYW1000
    Member

    Hi

    I can add a user to the form if it contains a ' in the address for example o'doherty.

    How can the validation be fixed within the script.

    Thanks
    Roy

    Posted 10 years ago #
  2. yuniar

    You can edit the "includes/common-validator.php" file. Search around line 343 for this code:

    $value[0] = trim($value[0]);

    change it to become:

    $value[0] = str_replace("'","",trim($value[0]));

    MachForm Founder

    Posted 10 years ago #
  3. ROYW1000
    Member

    Hi

    This is still not working when I am trying to create a user with an email address of Peter.O'Doherty@website.com to administer the forms.

    Thanks
    Roy

    Posted 10 years ago #
  4. yuniar

    Oh.. so it's the validation when creating a new user? In this case, you'll need to edit the "add_user.php" file.
    Search around line 89 for this:

    $user_input['user_email'] = trim(strtolower($_POST['au_user_email']));

    change it with this one:

    $user_input['user_email'] = str_replace("'","",trim(strtolower($_POST['au_user_email'])));

    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Reply