title: Validate date month and year
body: <p>I have a date in the form MM-YYYY (e.g: <code>04-2000</code>). I exploded the date into month and year and am now trying to check certain conditions on the month:</p>
  
  <ul>
  <li>between 1 and 12</li>
  <li>formed of 2 digits)</li>
  </ul>
  
  <p>and on the year:</p>
  
  <ul>
  <li>formed of 4 digits</li>
  </ul>
  
  <p>Is my syntax correct?</p>
  
  <pre><code>list($name_month, $name_year) = explode('-', $name_date, 2);
  if(($name_month &lt; 1 || $name_month &gt; 12 || $name_month ) || ($name_year)) {
      echo "&lt;br&gt;&lt;br&gt;Wrong date";
      $uploadOk = 0;}
  </code></pre>