title: How to check if format is correct
body: <p>Greetings, 
  I need to check whether the format of value stored database is correct. It should check for something like that:</p>
  
  <pre><code>x-x
  x-xx
  xx-xx
  xxx-xxx
  etc.
  </code></pre>
  
  <p>where xxx should be an integer. So the concept is to check if value has the following format:    Integer - Integer</p>