title: How to validate input in batch
body: <p>So i made a menu in batch and you have options to select what you would want to do, but if u enter a option thats not on the menu it selects the first option.  how would i make it echo invalid input please try again.<br>
  menu:</p>
  
  <pre><code>echo Please select what you would like to do!
  echo =========================================
  echo 1)Example 1 
  echo 2)Example 2
  echo 3)Example 3
  echo 4)Example 4
  echo 5)Example 5
  echo 6)Example 6
  echo =========================================
  set /p ans="Please enter your selection:"
  
  if %ans%==1 (
  goto a
  )
  if %ans%==2 (
  goto b
  )
  if %ans%==3 (
  goto c
  )
  if %ans%==4 (
  goto f
  )
  if %ans%==5 (
  goto g
  )
  if %ans%==6 (
  goto h
  )
  </code></pre>