• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: email validation rule

email validation rule 14 years 1 month ago #10040

  • komita
  • komita's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 40
  • Thank you received: 1
what does the email validation rule check for? just the @ symbol?

we are able to enter email addresses that have more or less than a 3 letter extension after the dot. this, of course, makes it invalid and unable to send the admin emails.

is there a fix to this or not do-able? Thanks, lauri
The administrator has disabled public write access.

Re:email validation rule 12 years 10 months ago #13928

  • Onnikoo
  • Onnikoo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello Lauri!

RSForm! Pro is using JMailHelper::isEmailAddress() function to validate the email address. The actual problem lies there. This solution worked just fine with me:

- Open libraries/joomla/mail/helper.php file
- Find function isEmailAddress()
- After the $domain_array has been defined apply the lines you can see here below...
// Check the domain DO NOT TOUCH THIS
$domain_array = explode(".", rtrim( $domain, '.' ));
$regex = '/^[A-Za-z0-9-]{0,63}$/';
 
// APPLY THE CODE BELOW		
// check that domain consists of at least two parts separated by a dot
if ( sizeof($domain_array)<2 )  
	{ return false; }
 
// Check that the last part in the array is longer than 1 but shorter than 4
if ( strlen( end($domain_array)	)<2 || strlen( end($domain_array) )>4 )
	{ return false; }
...
 

- Onnikoo
Last Edit: 12 years 10 months ago by Onnikoo.
The administrator has disabled public write access.

Re: email validation rule 11 years 7 months ago #18844

Hello,

this is very nice code for joomla default Email validation.

Thanks... :)
Last Edit: 11 years 7 months ago by abbasmomin1234. Reason: helpful code
The administrator has disabled public write access.

Re: email validation rule 11 years 5 months ago #19644

  • gavindcht
  • gavindcht's Avatar
  • OFFLINE
  • Banned
  • Posts: 63
  • Thank you received: 1
Indeed it is. I was able to use that a month ago with one of my clients.
Deleted code is debugged code.
The administrator has disabled public write access.

Re: email validation rule 11 years 4 months ago #20643

  • dmytro15
  • dmytro15's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello, nice code, but what about if I wish that certain domains will not be allowed to register as emails, I mean something like " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ", " This e-mail address is being protected from spambots. You need JavaScript enabled to view it ", people can register with these emails and I do not wish that.

regards
The administrator has disabled public write access.

Re: email validation rule 10 years 4 months ago #25706

  • it20
  • it20's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
any luck with setting up a validation rule to block certain domains? actually I would have a list of about 633 temp email services. really want to get rid of them. is there a quick way to do so in RSForms?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!