How can I find one instance of a character using REGEX?
<p>I have an input field that should only accept characters used in a currency syntax (dollar sign, numbers, commas, and decimals). How can I write my REGEX to check if a string contains atleast one character that is NOT from the above listed characters?</p>

<p>I've tried the following, but the problem with this expression is that if one valid character is present in the string it throws the 'else' statement. (unitPriceVal is the user input string)</p>

<p>I want to write a regex that checks if the WHOLE string consists of the valid Currency, if true run the else statement </p>

<pre><code>validCurrency = /([0-9\$.,])/;

if (!unitPriceVal.match(validCurrency) || unitPriceVal == "") {
                        unitPrice.setValueState("Error");
                    } else {
                        unitPrice.setValueState("None");
                    }
                }, 
</code></pre>