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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

[closed] Problem with one letter email addresses


  1. emmi
    Member

    When a user tried to signup on my form using his one letter email address he gets a error.

    There was a problem with your submission.
    Errors have been highlighted below.

    This field is not in the correct email format.

    Posted 16 years ago #
  2. yuniar

    hi emmi,

    what do you mean by one letter email address?

    like: a@example.com ?


    MachForm Founder

    Posted 16 years ago #
  3. emmi
    Member

    No, user@k.com

    Posted 16 years ago #
  4. yuniar

    Hmm.. you are right. MachForm indeed doesn't allow 1 character domain for the email.

    To overcome this, edit your includes/common-validator.php file.
    On line 205, you will find this code:

    $regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+\.[A-z0-9]{2,6}$/';

    Replace that line with this one:

    $regex = '/^[A-z0-9][\w.-]*@[A-z0-9\w\-\.]+\.[A-z]{2,6}$/';

    That should allow 1 character domain for email.


    MachForm Founder

    Posted 16 years ago #
  5. emmi
    Member

    Thanks. :)

    Posted 16 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.