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:
Rohit Jain
2024-07-23 15:02:49 +05:30
committed by GitHub

View File

@@ -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);
}
/**