Skip to content

Firefly III: a personal finances manager

Drop "failedValidation" method because this is handled by the system already.

James Cole009fbba491f5
diff --git a/app/Api/V1/Requests/Models/Rule/ValidateExpressionRequest.php b/app/Api/V1/Requests/Models/Rule/ValidateExpressionRequest.php
index 680823b6f9..b5523778f9 100644
--- a/app/Api/V1/Requests/Models/Rule/ValidateExpressionRequest.php
+++ b/app/Api/V1/Requests/Models/Rule/ValidateExpressionRequest.php
@@ -42,21 +42,5 @@ class ValidateExpressionRequest extends FormRequest
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)
- );
- }
+
}