How to modify OnClick Save Button

Hello, I added a custom validation using entrypoint, but after the validation the data wont save and the duplicate message wont appear

check my Custom Entrypoint Codes:

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

global $db;
$first_name = urldecode($_REQUEST['first_name']); 
$last_name   = urldecode($_REQUEST['last_name']);   
$mobile_number = $_REQUEST['mobile_number'];   

$sql = "SELECT * FROM accounts WHERE deleted = 0 AND first_name = '".$db->quote($first_name)."' AND last_name = '".$db->quote($last_name)."' AND mobile_number = '".$db->quote($mobile_number)."'";
$res = $db->query($sql);
if ($db->getRowCount($res) <= 0) {
    echo 'unique';
}else{
    echo 'exists';
}

and check my view.edit.php codes

$javascript = <<<'EOT'
        <script type= "text/javascript">
        function customJavascriptDuplicateValidation(thisview)
        {

            $.post('index.php?entryPoint=checkDuplicateCustomers', { first_name: $('#first_name').val(), last_name: $('#last_name').val(), mobile_number: $('#mobile_number').val() }, function(data)
            {
                if (data == 'exists') {
                    $('#error_msg').html('<strong style="color:red;"> &#x2717; Already Used</strong>');
                    return false;
                }else{
                    return check_form('EditView');
                }
            });
        }
        
        </script>
        EOT;

And I also added a save modified/custom code in editviewdefs.php

$viewdefs['Accounts']['EditView']['templateMeta']['form']['buttons'][0] = array(
    'customCode' => '<input title="Save" accesskey="a" class="button primary" onclick="var _form = document.getElementById(\'EditView\'); _form.action.value=\'Save\'; if(customJavascriptDuplicateValidation(\'EditView\'))SUGAR.ajaxUI.submitForm(_form);return false;" type="submit" name="button" value="Save" id="SAVE">',
);

The default validation is working, but the data wont save and the **Already Used** error wont appear.

I updated my code the validation is working but not saving.

$javascript = <<<'EOT'
        <script type= "text/javascript">
        function customJavascriptDuplicateValidation(thisview)
        {
            var returnvalue;
            var firstname = document.getElementById('first_name').value;
            var lastname = document.getElementById('last_name').value;
            var mobile = document.getElementById('mobile_number').value;
            var birthday = document.getElementById('birthday').value;
            var email = document.getElementById('email_c').value;
            var location = document.getElementById('location_code').value;
            var consent = document.getElementById('consent_timestamp_date').value;
            var salutation = document.getElementById('salutation').value;
            
            //$.post('index.php?entryPoint=checkDuplicateCustomers', { first_name: $('#first_name').val(), last_name: $('#last_name').val(), mobile_number: $('#mobile_number').val() }, function(data)
            $.post('index.php?entryPoint=checkDuplicateCustomers', { first_name: firstname, last_name: lastname, mobile_number: mobile }, function(data)
            {
                if (data == 'exists') {
                    $('#error_firstname_msg').html('<strong style="color:red;"> &#x2717; Already Used</strong>');
                    $('#error_lastname_msg').html('<strong style="color:red;"> &#x2717; Already Used</strong>');
                    $('#error_mobile_msg').html('<strong style="color:red;"> &#x2717; Already Used</strong>');
                    return check_form('EditView');
                    return false;
                }else if (data == 'unique'){
                    $('#error_firstname_msg').html('<strong style="color:green;"> &#x2713;</strong>');
                    $('#error_lastname_msg').html('<strong style="color:green;"> &#x2713;</strong>');
                    $('#error_mobile_msg').html('<strong style="color:green;"> &#x2713;</strong>');
                    if(firstname != '' && lastname != '' && mobile != '' && birthday != '' && email != '' && location != '' && consent != '' && salutation != ''){
                         SUGAR.ajaxUI.showLoadingPanel();
                        return check_form('EditView');
                    }else{
                        return check_form('EditView');
                    }
                }else{
                    $('#error_firstname_msg').hidden;
                    $('#error_lastname_msg').hidden;
                    $('#error_mobile_msg').hidden;
                    return check_form('EditView');
                }
            });
        }
        
        </script>
        EOT;