Why is there no definition of .match is not a function

 
  var cashpledge=$("-sharpcashpledge").val();

 var reg = /^\+?(?!0+(\.00?)?$)\d+(\.\d\d?)?$/;
                var r = cashpledge.match(reg);
                if (r == null) {
                    alert("");
                } else {
                    window.location.href="__SELF__/cashpledge/"+cashpledge;
                }

clipboard.png

Mar.23,2021

is your cashpledge a number, or undefined, so there is no match method

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c5b5-4d9a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c5b5-4d9a6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?