[-] WS : Fixed PSFV-383
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13510 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -233,6 +233,17 @@ class ValidateCore
|
||||
return preg_match('/^[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for price validity (including negative price)
|
||||
*
|
||||
* @param string $price Price to validate
|
||||
* @return boolean Validity is ok or not
|
||||
*/
|
||||
public static function isNegativePrice($price)
|
||||
{
|
||||
return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for language code (ISO) validity
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user