mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Auto commit for release 'develop' on 2024-02-22
This commit is contained in:
@@ -20,7 +20,7 @@ class IsValidAmount implements ValidationRule
|
||||
$value = (string)$value;
|
||||
|
||||
// must not be empty:
|
||||
if($this->emptyString($value)) {
|
||||
if ($this->emptyString($value)) {
|
||||
$fail('validation.filled')->translate();
|
||||
$message = sprintf('IsValidAmount: "%s" cannot be empty.', $value);
|
||||
Log::debug($message);
|
||||
@@ -30,7 +30,7 @@ class IsValidAmount implements ValidationRule
|
||||
}
|
||||
|
||||
// must be a number:
|
||||
if(!$this->isValidNumber($value)) {
|
||||
if (!$this->isValidNumber($value)) {
|
||||
$fail('validation.numeric')->translate();
|
||||
$message = sprintf('IsValidAmount: "%s" is not a number.', $value);
|
||||
Log::debug($message);
|
||||
@@ -40,7 +40,7 @@ class IsValidAmount implements ValidationRule
|
||||
}
|
||||
|
||||
// must not be scientific notation:
|
||||
if($this->scientificNumber($value)) {
|
||||
if ($this->scientificNumber($value)) {
|
||||
$fail('validation.scientific_notation')->translate();
|
||||
$message = sprintf('IsValidAmount: "%s" cannot be in the scientific notation.', $value);
|
||||
Log::debug($message);
|
||||
@@ -50,7 +50,7 @@ class IsValidAmount implements ValidationRule
|
||||
}
|
||||
|
||||
// must be more than minus a lots:
|
||||
if($this->lessThanLots($value)) {
|
||||
if ($this->lessThanLots($value)) {
|
||||
$amount = bcmul('-1', self::BIG_AMOUNT);
|
||||
$fail('validation.gte.numeric')->translate(['value' => $amount]);
|
||||
$message = sprintf('IsValidAmount: "%s" must be more than %s.', $value, $amount);
|
||||
@@ -61,7 +61,7 @@ class IsValidAmount implements ValidationRule
|
||||
}
|
||||
|
||||
// must be less than a large number
|
||||
if($this->moreThanLots($value)) {
|
||||
if ($this->moreThanLots($value)) {
|
||||
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
||||
$message = sprintf('IsValidAmount: "%s" must be more than %s.', $value, self::BIG_AMOUNT);
|
||||
Log::debug($message);
|
||||
|
Reference in New Issue
Block a user