Selamlar

Yorum formumda hata var ise bir alert gösteriyorum. İnternetten şu kodu buldum ve denedim çalıştı.
https://wordpress.stackexchange.com/...-the-same-page

Daha sonra sweet alert entegresi için error kısımını şöyle değiştirdim.

errorElement: "div",
    errorPlacement: function(error, element) {
        Swal.fire({
            position: 'top-end',
            icon: 'success',
            title: 'Your work has been saved',
            showConfirmButton: false,
            timer: 1500
        })
      
    }
Çok güzel çalışıyor ama iki kere çalışıyor. Bu sorunu nasıl çözerim?

Tam kod: https://kodyapistir.com/arLUDCjKiI