mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix amount
This commit is contained in:
parent
4a37152aea
commit
f045e4ea69
@ -60,7 +60,7 @@ class IsValidAmount implements ValidationRule
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// must be less than 100 million and 1709:
|
// must be less than a large number
|
||||||
if($this->moreThanLots($value)) {
|
if($this->moreThanLots($value)) {
|
||||||
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
||||||
$message = sprintf('IsValidAmount: "%s" must be more than %s.', $value, self::BIG_AMOUNT);
|
$message = sprintf('IsValidAmount: "%s" must be more than %s.', $value, self::BIG_AMOUNT);
|
||||||
|
@ -55,7 +55,7 @@ class IsValidPositiveAmount implements ValidationRule
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// must be less than 100 million and 1709:
|
// must be less than a large number
|
||||||
if($this->moreThanLots($value)) {
|
if($this->moreThanLots($value)) {
|
||||||
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
||||||
$message = sprintf('IsValidPositiveAmount: "%s" must be less than %s.', $value, self::BIG_AMOUNT);
|
$message = sprintf('IsValidPositiveAmount: "%s" must be less than %s.', $value, self::BIG_AMOUNT);
|
||||||
|
@ -55,7 +55,7 @@ class IsValidZeroOrMoreAmount implements ValidationRule
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// must be less than 100 million and 1709:
|
// must be less than a large number
|
||||||
if($this->moreThanLots($value)) {
|
if($this->moreThanLots($value)) {
|
||||||
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
$fail('validation.lte.numeric')->translate(['value' => self::BIG_AMOUNT]);
|
||||||
$message = sprintf('IsValidPositiveAmount: "%s" must be less than %s.', $value, self::BIG_AMOUNT);
|
$message = sprintf('IsValidPositiveAmount: "%s" must be less than %s.', $value, self::BIG_AMOUNT);
|
||||||
|
@ -25,7 +25,8 @@ namespace FireflyIII\Support\Validation;
|
|||||||
|
|
||||||
trait ValidatesAmountsTrait
|
trait ValidatesAmountsTrait
|
||||||
{
|
{
|
||||||
protected const string BIG_AMOUNT = '10000170900';
|
// 19-09-2020: my wedding day lol
|
||||||
|
protected const string BIG_AMOUNT = '10019092020';
|
||||||
|
|
||||||
final protected function emptyString(string $value): bool
|
final protected function emptyString(string $value): bool
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user