title: Input Field Validation with min max values coming from database
body: <p>as the title says i want to validate (dynamically created) input fields (there could be many). HTML 5 is not supported by the browsers that i have to support :( - so i can't use the build in min max check. 
  Lets say i have the following simplified database structure:</p>
  
  <p>id, min-value, max-value, standard value</p>
  
  <p>So when an input field with a specific id is requested by the user a new field is generated in php (get some information from the database) and sent back to the user. </p>
  
  <p>In my opinion i have the following opportunities:</p>
  
  <ol>
  <li>i could use some inline js like ...onchange="checkMinMax(minvalue,maxvalue)"</li>
  <li>append two hiddenfields to this input field with the values and check with global inputValidation function if the input value by an specific input field id matches the min/max clause</li>
  <li><p>dont use a database, but define min and max in inputValidation function like:</p>
  
  <pre><code>var id = $(inputField).attr('id')
  var val = $(inputField).val()
  switch(id){
  case 1:
  checkMinMax(val ,minvalue, maxvalue);
  break;
  case 2:
  ...
  }
  </code></pre></li>
  </ol>
  
  <p>I hope you can imagine what i am trying to achieve. So i appreciate your comments. </p>