How to use the sweetalert2.showValidationMessage function in sweetalert2

To help you get started, we’ve selected a few sweetalert2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TronWatch / TronLink-Demo-Messages / src / components / App / index.js View on Github external
}).then(() => true).catch(err => {
                    Swal.showValidationMessage(err);
                });
            }
github TronWatch / TronLink-Demo-Messages / src / components / App / index.js View on Github external
preConfirm: amount => {
                if(isNaN(amount) || amount <= 0) {
                    Swal.showValidationMessage('Invalid tip amount provided');
                    return false;
                }

                return Utils.contract.tipMessage(+messageID).send({
                    callValue: Number(amount) * 1000000
                }).then(() => true).catch(err => {
                    Swal.showValidationMessage(err);
                });
            }
        });