Audit validation errors.

This commit is contained in:
James Cole 2024-01-01 10:15:19 +01:00
parent 5b41e58025
commit ab0b03dd14
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -76,7 +76,10 @@ class BudgetFormStoreRequest extends FormRequest
public function withValidator(Validator $validator): void
{
Log::channel('audit')->info(sprintf('Validation errors for budget store: %s', var_export($validator->fails(), true)));
if($validator->fails()) {
Log::channel('audit')->error(sprintf('Validation errors for budget'), $validator->errors()->toArray());
}
$validator->after(
function (Validator $validator): void {
// validate all account info