title: validate input field only contains numbers and decimal (money format)
body: <p>I know this prob a really simple question..  I just need a pay to validate a text input field on my form.  I know I can use the number type for HTML5 and have looked at prey_replace but I don't understand that function for the life of me..</p>
  
  <p>What is the best way for me to validate a input field in my form? PHP, JQuery, Other?  Just want to make sure what is inserted in the text field is in money format like 00.00 (I have set the maxlength of the text input to 5) I just need to check now to make sure only numbers or number and decimal is the only thing submitted when the form submits..</p>
  
  <p>This may be overkill for what I need it for but I did find this fiddle from another question: <a href="http://jsfiddle.net/vY39r/11/" rel="nofollow">http://jsfiddle.net/vY39r/11/</a>  However I can't get it to work and I made sure the names match.</p>
  
  <p>Here is a basic example of what I have:</p>
  
  <pre><code>&lt;form name="setPrices" action="" method="POST"&gt;
  
  &lt;fieldset&gt;
  &lt;label for="lowPrice"&gt;Low Resolution:&lt;/label&gt;
  &lt;input type="text" class="price" id="lowPrice" name="lowPrice" value="&lt;?php echo $low_price; ?&gt;" maxlength="5" /&gt;
  &lt;/fieldset&gt;
  
  &lt;fieldset&gt;
  &lt;label for="mediumPrice"&gt;Medium Resolution:&lt;/label&gt;
  &lt;input type="text" class="price" id="mediumPrice" name="mediumPrice" value="&lt;?php echo $medium_price; ?&gt;" maxlength="5" /&gt;
  &lt;/fieldset&gt;
  
  &lt;fieldset&gt;
  &lt;label for="highPrice"&gt;High Resolution:&lt;/label&gt;
  &lt;input type="text" class="price" id="highPrice" name="highPrice" value="&lt;?php echo $high_price; ?&gt;" maxlength="5" /&gt;
  &lt;/fieldset&gt;
  
  &lt;input type="hidden" name="submitted" id="submitted" value="true" /&gt;
  
  &lt;button type="submit" id="submit" class="button"&gt;Save&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>