Regular expression to check the currency upto 2 digit in JavaScript
Regular expression to check the currency upto 2 digit in JavaScript such as 34, 45.45, 567.45 etc. <html> <head> <script type="text/javascript"> var reg = /^\d+(\.\d\d)?$/; function CurrencyValidation(Currency) { var OK = reg.exec(Currency.value); if (!OK) window.alert("Currency isn’t valid"); else window.alert("Currency is valid"); } </script> </head> <body> <p>Enter your Currency up to two decimal numbers … Continue reading “Regular expression to check the currency upto 2 digit in JavaScript”