mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Fix for Trac #337: email validation. Use a simpler regular expression that is much faster to execute.
SVN:trunk[1009]
This commit is contained in:
@@ -1092,7 +1092,8 @@ class AttributeEmailAddress extends AttributeString
|
||||
{
|
||||
public function GetValidationPattern()
|
||||
{
|
||||
return "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
|
||||
// return "^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$";
|
||||
return "^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$";
|
||||
}
|
||||
|
||||
public function GetAsHTML($sValue)
|
||||
|
||||
Reference in New Issue
Block a user