mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Drop "failedValidation" method because this is handled by the system already.
This commit is contained in:
@@ -42,21 +42,5 @@ class ValidateExpressionRequest extends FormRequest
|
|||||||
return ['expression' => ['required', new IsValidActionExpression()]];
|
return ['expression' => ['required', new IsValidActionExpression()]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle a failed validation attempt.
|
|
||||||
*
|
|
||||||
* @throws ValidationException
|
|
||||||
*/
|
|
||||||
protected function failedValidation(Validator $validator): void
|
|
||||||
{
|
|
||||||
$error = $validator->errors()->first('expression');
|
|
||||||
|
|
||||||
throw new ValidationException(
|
|
||||||
$validator,
|
|
||||||
response()->json([
|
|
||||||
'valid' => false,
|
|
||||||
'error' => $error,
|
|
||||||
], 200)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user