Merge pull request #1109 from sumitwebkul/gli-1768
Updated: Decimal digits maximum limit is removed from price validation by Validate::isPrice()
This commit is contained in:
@@ -233,7 +233,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isPrice($price)
|
||||
{
|
||||
return preg_match('/^[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
return preg_match('/^[0-9]{1,10}(\.[0-9]{1,})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,7 +244,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isNegativePrice($price)
|
||||
{
|
||||
return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,9})?$/', $price);
|
||||
return preg_match('/^[-]?[0-9]{1,10}(\.[0-9]{1,})?$/', $price);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user