// clean code && fix norm

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13081 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
aFolletete
2012-02-07 15:31:59 +00:00
parent 29002976ed
commit 11a74c652a
6 changed files with 243 additions and 216 deletions
+12 -1
View File
@@ -654,7 +654,7 @@ class ValidateCore
}
/**
* Check url valdity (disallowed empty string)
* Check url validity (disallowed empty string)
*
* @param string $url Url to validate
* @return boolean Validity is ok or not
@@ -664,6 +664,17 @@ class ValidateCore
return preg_match('/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $url);
}
/**
* Check tracking number validity (disallowed empty string)
*
* @param string $tracking_number Tracking number to validate
* @return boolean Validity is ok or not
*/
public static function isTrackingNumber($tracking_number)
{
return preg_match('/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $tracking_number);
}
/**
* Check url validity (allowed empty string)
*