Code for new release.

This commit is contained in:
James Cole
2024-01-02 20:19:09 +01:00
parent 9eca31529c
commit bc26ee5cde
85 changed files with 474 additions and 187 deletions

View File

@@ -30,18 +30,21 @@ class IsValidPositiveAmount implements ValidationRule
if(!$this->isValidNumber($value)) {
$fail('validation.numeric')->translate();
Log::info(sprintf('IsValidPositiveAmount: "%s" is not a number.', $value));
return;
}
// must not be scientific notation:
if($this->scientificNumber($value)) {
$fail('validation.scientific_notation')->translate();
Log::info(sprintf('IsValidPositiveAmount: "%s" cannot be in the scientific notation.', $value));
return;
}
// must be more than zero:
if($this->lessOrEqualToZero($value)) {
$fail('validation.more_than_zero')->translate();
Log::info(sprintf('IsValidPositiveAmount: "%s" must be more than zero.', $value));
return;
}
// must be less than 100 million and 1709: