title: number that start with 2 digits in form validation
body: <p>I tried with substract to 'pick up' the 2 digits but it does not work ,'boleta' have to start with '20',else is show the message "Introduce solo los 10 digitos de tu Boleta!".</p>
  
  <p>thanks!</p>
  
  <pre><code>&lt;?php
  // define variables and set to empty values
  $nombreErr = $boletaErr = "";
  $nombre = $boleta =  "";
  
  if ($_SERVER["REQUEST_METHOD"] == "POST"){
  if (empty($_POST["boleta"])){
  $boletaErr = "Boleta is required";
  }
  else{
  $boleta = test_input($_POST["boleta"]);
  $boletavalida=substr($boleta,0,2); 
  //check if boleta only contains numbers
  if (!preg_match('/^[0-9]{10}+$/', $boleta) &amp;&amp; !$boletavalida ==20){
  $boletaErr="Introduce solo los 10 digitos de tu Boleta!";
  }   
  }
  }
  
  function test_input($data){
  $data = trim($data);
  $data = stripslashes($data);
  $data = htmlspecialchars($data);
  return $data;
  }
  ?&gt;
  </code></pre>