1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Custom Email Validation Rule

Discussion in 'XenForo Development Discussions' started by semprot, Aug 30, 2015.

  1. semprot

    semprot Active Member

    How to make custom email validation rule (in registration, updating email info by the user himself etc) ?

    For example, if the user inputs email with any "+", an error message will be displayed "Email should not contain any plus sign".

    And if the user inputs email with more than 3 dots, another error message will be displayed "Email should not contain more than 3 dots."

    Thank you :)
  2. adwade

    adwade Active Member

    You are referring to a mod like @ozzy47's Block Registrations With Spam Like Email Addresses which I would find quite handy, but I've not seen a similar add-on for XF yet. :confused:

    It would be convenient if the AdminCP/User Registration page at least had a regex block for valid email requirements.
    semprot and ozzy47 like this.
  3. semprot

    semprot Active Member

    Just an update. I think i find out how to achieve it.

    I think i need to edit this file :
    In this function
    public static function isEmailValid($email)
    I have not tried, i will test it soon ;)

Share This Page