title: Validate HTML5 Numeric Input Before Sending up to Server
body: <p>I'm writing a web based application that does calculations. Instead of the user filling out a form on a JSP and then getting the results on another JSP, I want to have an HTML page using HTML5 to ask the user for numeric input and then display the calculated output on a JSP. Is there any server side method to verify the user entered only numeric information? So far I used used 3 HTML5 input boxes like:
   <code>&lt;input type="number" name="width" min=".1" step=".1" max="500"&gt;</code> </p>
  
  <p>It appears the only validation it does is catch if the user enters numeric input under the min value or over the max value. If nothing is entered it still sends. I want it to not let you send the data unless all 3 boxes are valid. I know you can simply use JavaScript for this but it's a JSP class so my instructor wouldn't like if I use anything other than HTML or JSP. Thanks in advance.</p>
  
  <p>EDIT</p>
  
  <p>Here's the page they will get prompted with:</p>
  
  <p><code>&lt;form method="get" action="carpetprice.jsp"&gt;
                          Width of room in feet: &lt;input type="number" name="width" min=".1" step=".1" max="500"&gt;&lt;br /&gt;
                          Length of room in feet: &lt;input type="number" name="length" min=".1" step=".1" max="500"&gt;&lt;br /&gt;
                          Price of carpet per square foot: &lt;input type="number" name="width" min=".1" step=".1" max="500"&gt;&lt;br /&gt;
                          &lt;input type="submit" value="Compute Carpet Price"&gt;
                          &lt;/form&gt;</code></p>
  
  <p>I dont want it to send any of the data to "carpetprice" until it has been fully validated.</p>