[-] WS : Fixed PSFV-383

This commit is contained in:
aKorczak committed 2012-02-21 15:55:38 +00:00
1 parent b88a546f19
commit 64cf5b1623
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -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
*