 <p>if you need to validate decimal with dots, commas, positives and negatives try this:</p> <pre><code>Object testObject = "-1.5"; boolean isDecimal = Pattern.matches("^[\\+\\-]{0,1}[0-9]+[\\.\\,]{1}[0-9]+$", (CharSequence) testObject); </code></pre> <p>Good luck.</p>