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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Prevent Email Entries from trbvm.com @ Forms


  1. ConnecTED
    Member

    Hello, I'm experienced a problem with users that are not using their real email addresses to fill the email field of my forms but they are using a temporary 10 minute email address from that site: http://10minutemail.com/10MinuteMail/index.html

    That site is giving random email address that is active for 10 minutes...it's using addresses like: a3157254@trbvm.com, a3163727@trbvm.com etc...

    Is there any way to setup a rule to the email field I use to my forms to not accept emails from trbvm.com ?

    Posted 9 years ago #
  2. williamansley
    Member

    @ConnecTED: Not without customizing the Machform code, to the best of my knowledge. Sorry, but I can't give you any help on how to go about this; perhaps the Appnitro staff or other users will be able to help.

    Posted 9 years ago #
  3. ConnecTED
    Member

    Thank you Willian for the reply, If my request is something that is not possible by using only a rule, what file I have to modify to prevent these enties?

    Posted 9 years ago #
  4. yuniar

    You might want to check this:
    http://www.appnitro.com/forums/topic/blocking-yahoo-accounts-in-email-field?replies=5


    MachForm Founder

    Posted 9 years ago #
  5. ConnecTED
    Member

    Hello Yuniar, can you please confirm that the following change in code is ok?

    //validation to check URL format
    	function mf_validate_website($value) {
    		global $mf_lang;
    
    		$error_message = $mf_lang['val_website'];
    		$value[0] = trim($value[0],'/').'/';
    
    		if(!empty($value[0])){
    			$regex  = '/^https?:\/\/([a-z0-9]([-a-z0-9]*[a-z0-9])?\.)+([A-z0-9]{2,})(\/)(.*)$/i';
    			$result = preg_match($regex, $value[0]);
    
    			if(empty($result)){
    				return sprintf($error_message,'%s',$value[0]);
    			}else{
    				//block 10 Minute Mail
    
    				if(strpos(strtolower($value[0]), 'trbvm') !== false ){
    					return "Sorry. Please use a non-10 Minute Mail address";
    				}else{
    					return true;
    				}
    				return true;
    			}
    		}else{
    			return true;
    		}
    	}
    Posted 9 years ago #
  6. yuniar

    Yes, the code looks good.


    MachForm Founder

    Posted 9 years ago #

RSS feed for this topic

Reply