try tu update

This commit is contained in:
Romulus21
2024-07-17 08:44:35 +02:00
parent 95c5b0814a
commit 755181c328
2 changed files with 1 additions and 5 deletions

View File

@@ -1,8 +1,6 @@
import {AxiosError} from "axios"
export function displayFormErrors(error: ValidationErrors|AxiosError, form: HTMLElement|null = null) {
export function displayFormErrors(error: ValidationErrors, form: HTMLElement|null = null) {
if (error.response && error.response.status === 422) {
// @ts-ignore
const errors = error.response.data.errors
const formBase = (form) ? form : document.body
Object.entries(errors).forEach(([key, value]) => {