Updated: decimal maximum limit is removed from price validation Validate::isPrice()

This commit is contained in:
Sumit Panwar
2024-06-05 16:21:22 +05:30
parent 7e897d134e
commit 190907346b

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