Hi to all,
I need to modify the validation of email addresses to include the character 'ñ' but so far I haven't been able to do it. I tried the following modifications:
in:
include\SugarEmailAddress\SugarEmailAddress.php
added the letter ñ and Ñ:
var $regex = "/([a-zñA-ZÑ0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})/";
in:
jssource\src_files\include\javascript\sugar_3.js
include\javascript\sugar_3.js
include\javascript\sugar_grp1.js
added the letter Ñ in the isValidEmail function:
if(!/^\s*[\w.%+\-&'\/]+@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[\w-]{2,}\s*$/i.test(emailAddress) &&
!/^.*<[A-ZÑ0-9._%+\-&']+?@([A-Z0-9-]+\.)*[A-Z0-9-]+\.[\w-]{2,}>\s*$/i.test(emailAddress)) {
return false;
But I am still getting the invalid email message when I try to save. Am I missing something here ? Plz help me with this.
Thanks
» Operating system type and version: Windows 2003 Server
» Sugar version and edition: 5.5.1 Community Edition
» Webserver type and version: IIS 6
» PHP version: 5.2.11
» MS SQL server 2008 version


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks