Ask a question about validform form validation

about custom validation error messages are displayed in a pop-up box

related code:
<form id="addaddress-form">
    <div class="m-cell">
        <div class="cell-item">
            <div class="cell-left">:</div>
            <div class="cell-right">
                <input type="text" name="uname" class="cell-input" datatype="*" placeholder="" >
            </div>
        </div>
        <div class="cell-item">
            <div class="cell-left">:</div>
            <div class="cell-right">
                <input type="number" name="uphone" pattern="[0-9]*" datatype="*" class="cell-input" placeholder="" 
                />
            </div>
        </div>
        <div class="cell-item">
            <div class="cell-left">:</div>
            <div class="cell-right">
                <input type="text" name="uaddress" class="cell-input cell-arrow" datatype="*" placeholder="//">
            </div>
        </div>
        <div class="cell-item">
            <div class="cell-left">:</div>
            <div class="cell-right">
                <input type="text" name="udetailedaddress" class="cell-input" datatype="*" placeholder="">
            </div>
        </div>
    </div>
    <div class="pd20">
        <button type="button" class="btn-block btn-fcx j-save"></a>
    </div>
</form>
$(function () {
    // var dialog = window.YDUI.dialog;
    var addaddressForm = $("-sharpaddaddress-form").Validform({
        btnSubmit: ".j-save",
        tiptype: function (msg, o, cssctl) {
            if (o.type !== 2) {
                //dialog.toast(msg, "error", 1000, function () {});
            } else {
                return false;
            }
        },
        tipSweep: true,
        showAllError: false,
        beforeSubmit: function (curform) {
            console.log(curform)
            return false;
        }
    });
});
The problem with

is that when an error message is prompted, the currently validated input box automatically gets focus. I want to cancel it, and those who fail the verification will not automatically get to focus.

Please! -_! Found the document and did not find the corresponding parameters. aah! aah!

Mar.28,2021

use document.activeElement.blur (); after verification

Menu