[ // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed 'required', 'numeric', 'min:0', 'max:255', function ($attribute, $value, $fail) { if (($value * 10) % 5 !== 0) { $fail("Le Montant de l'opération doit être divisible par 0.5 jour/homme"); } }, ], ]; } /** * Get custom attributes for validator errors. * * @return array */ public function attributes(): array { return [ 'amount' => trans('Montant de l\'opération'), ]; } }