$('.check_phone_or_email_button').click(async function (e) {
    e.preventDefault();
    $(this).attr('disabled', true);

    let form = $('.check_phone_or_email_form'),
        data = new FormData(form[0]),
        url = form.attr('action'),
        method = form.attr('method');

    const response=await ajax({
        url,
        data,
        dataType: 'json',
        method,
        contentType: false,
        processData: false,
    });

    if (response.errors) {
        toasterError(response.errors);
        $(this).removeAttr('disabled');

    }
    if (response.url) {
        window.location.href = response.url;
    }
});
