fix test errors
API CI/CD / Validate (composer + pint) (push) Successful in 2m47s
API CI/CD / Test (PHPUnit) (push) Failing after 3m8s
API CI/CD / Build frontend assets (push) Failing after 5m22s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
API CI/CD / Validate (composer + pint) (push) Successful in 2m47s
API CI/CD / Test (PHPUnit) (push) Failing after 3m8s
API CI/CD / Build frontend assets (push) Failing after 5m22s
API CI/CD / Security audit (push) Failing after 34s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped
This commit is contained in:
@@ -15,6 +15,11 @@ class RefundRecalculateRequest extends ApiFormRequest
|
||||
{
|
||||
return [
|
||||
'invoice_number' => ['nullable', 'string', 'max:100'],
|
||||
'amount' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
|
||||
'paid_amount' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
|
||||
'total' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
|
||||
'unit_cost' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
|
||||
'fee' => ['nullable', 'numeric', 'gt:0', 'max:999999999999.99'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,8 +25,10 @@ class RoleUpdateRequest extends ApiFormRequest
|
||||
|
||||
$currentName = strtolower(trim((string) ($current?->name ?? '')));
|
||||
$currentSlug = strtolower(trim((string) ($current?->slug ?? '')));
|
||||
$incomingName = strtolower(trim((string) $this->input('name', '')));
|
||||
$incomingSlug = strtolower(trim((string) $this->input('slug', '')));
|
||||
$nameInput = $this->input('name', '');
|
||||
$slugInput = $this->input('slug', '');
|
||||
$incomingName = is_scalar($nameInput) ? strtolower(trim((string) $nameInput)) : '';
|
||||
$incomingSlug = is_scalar($slugInput) ? strtolower(trim((string) $slugInput)) : '';
|
||||
|
||||
$nameRules = ['sometimes', 'string', 'min:3', 'max:255'];
|
||||
if ($incomingName !== '' && $incomingName !== $currentName) {
|
||||
|
||||
Reference in New Issue
Block a user