[NOT BUG: 1.0.11] Contact Us, validation script popup

Locked
User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

[NOT BUG: 1.0.11] Contact Us, validation script popup

Post by Robin » Sun Sep 03, 2006 7:15 pm

Two users have reported a broken contact us page after updating to 1.0.11.
When using this page they get a "Make sure the form is complete and valid" popup message.

http://forum.joomla.org/index.php/topic,91604.0.html
http://forum.joomla.org/index.php/topic,91127.0.html

Status; Under review
Last edited by RobS on Mon Sep 11, 2006 12:58 am, edited 1 time in total.

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

Re: [UNDER REVIEW: 1.0.11] Contact Us, validation script popup

Post by friesengeist » Sun Sep 03, 2006 9:32 pm

We may not be able to control the wind, but we can always adjust our sails

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: [UNDER REVIEW: 1.0.11] Contact Us, validation script popup

Post by Robin » Mon Sep 04, 2006 10:34 am

Note; consider adding to known issue list to inform users.

User avatar
RobS
Joomla! Ace
Joomla! Ace
Posts: 1367
Joined: Mon Dec 05, 2005 10:17 am
Location: New Orleans, LA, USA
Contact:

Re: [UNDER REVIEW: 1.0.11] Contact Us, validation script popup

Post by RobS » Mon Sep 11, 2006 12:57 am

Tagged [NOT BUG] and moving to resolved forum.
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions

Morgg
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Nov 30, 2006 9:23 am

Re: [NOT BUG: 1.0.11] Contact Us, validation script popup

Post by Morgg » Thu Feb 01, 2007 7:14 pm

I found another possible case for this problem, and I already solved it.
The Contacts component was giving me the "Please make sure the form is complete and valid" error message, even though the addresses were right. After digging in the code, I found out the validation was failing due to the first level domain was longer than 4 characters.

The regular expression in JosIsValidEmail() (in /includes/joomla.php around line 3930) limits the length to 4 characters in the domain after the "dot" (e.g. user@domain.this). This should be enough for internet domains, but I am using it in an Intranet environment and the domain is longer.

Code: Select all

function JosIsValidEmail( $email ) {
	$valid = preg_match( '/^[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,[b]4[/b]}$/', $email );	
	return $valid;
}
If you change that to the following code, it should work perfectly.

Code: Select all

function JosIsValidEmail( $email ) {
	$valid = preg_match( '/^[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,[b]6[/b]}$/', $email );	
	return $valid;
}
Hope it works, It gave me some headaches for 2 days...
Last edited by Morgg on Thu Feb 01, 2007 7:17 pm, edited 1 time in total.

User avatar
nkakwani
Joomla! Intern
Joomla! Intern
Posts: 88
Joined: Sun Apr 22, 2007 5:41 pm
Location: India
Contact:

Re: [NOT BUG: 1.0.11] Contact Us, validation script popup

Post by nkakwani » Mon Jun 25, 2007 4:35 pm

The Contacts component was giving me the "Please make sure the form is complete and valid" error message, even though the addresses were right.

In my joomla 1.0.12
site is
http://countrywideresidentials.co.uk/cm ... t&Itemid=3
I tried by changing email permission to 6 & then 9 but didn't worked. Any solution? Thanks!!
Niranjan


Locked

Return to “Q&T 1.0.x Resolved - Archived”