title: Handling From and To Range Field Values
body: <p>Say for example I am getting a range of integers from a user:</p>
  
  <p>Generate between <em>nnn</em> and <em>nnn</em> widgets.</p>
  
  <p>Yes, most users will ensure that the first number is equal to or less than the second number:</p>
  
  <p>Generate between <strong>3</strong> and <strong>7</strong> widgets.</p>
  
  <p>But then there's <strong>that</strong> user, who wants to enter this data "back to front";</p>
  
  <p>Generate between <strong>7</strong> and <strong>3</strong> widgets.</p>
  
  <p>Do you <em>quietly</em> switch the fields around when the user clicks OK/Apply so, in the example above, you change the range of 7 to 3 back to 3 to 7 in the GUI? This might not be so practical on a web form where the user enters some data and then submits the form never to see it again but I'm thinking more in terms of a desktop application's settings page where the user's input is saved and subsequently viewed and edited again by the user.</p>
  
  <p>Is it more important to try and educate users to enter a range that "makes sense" via error/alert messages, or quietly cajole their entries into the shape an application is expecting?</p>
  
  <p>I suspect the "cajoling option" is more preferable, but could this "hey the program messed with my data!" approach be a problem for users?</p>
  
  <p>I am currently writing an application that has a handful of these user-configurable ranges so I'm very interested to follow the general consensus of the SO experts.</p>