title: jQuery Inputmask - decimal value negative or positive with mask in input element
body: <p>I’m trying to add a inputmask to an input element which allows the user to enter a decimal between -90 and 90 with 0 to 4 numbers after the decimal separator (side note: I’m using jQuery validate for min &amp; max value validation).</p>
  
  <p>I was able to make it work for positive values using this code:</p>
  
  <pre><code>$("#id").inputmask("99,9{0,4}");
  </code></pre>
  
  <p>I tried to extend it to allow negative values with the following code:</p>
  
  <pre><code>$.mask.definitions['~']='[+-]';
  $("#id").inputmask("~99,9{0,4}");
  </code></pre>
  
  <p>Which did not work; The value started always with a “–“ and it was not possible to replace it with a “+” or to remove it.</p>
  
  <p>My last try was this:</p>
  
  <pre><code>$('#id').inputmask('decimal', { 
          radixPoint: ".", 
          integerDigits: 2,
          digits: 4,
          digitsOptional: true,
          autoGroup: true,
          allowPlus: true,
          allowMinus: true
      });
  </code></pre>
  
  <p>This works almost, but I have the following problems:</p>
  
  <ul>
  <li>The input element does not contain a visible mask (something like __.____)</li>
  <li>The user must enter the “-” or “+” sign as first character, it is not possible to add a minus to the start of the input.</li>
  </ul>
  
  <p>My goal is to have an input element with a visible mask, preferably in the following format __.____, which  allows the user to enter negative or positive values. The user should be able to add a minus sign to the start of the input (after (and before) he entered the number).</p>
  
  <p><strong>Edit: Added fiddle</strong> 
  <a href="https://jsfiddle.net/musium/a4mbfuae/" rel="nofollow noreferrer">JSFiddle</a></p>