title: CakePHP 3.0 - Regular expression validation
body: <p>I need to validate an input based on a regular expression.</p>
  
  <pre><code> //Validator
   $validator
              -&gt;notEmpty('sl_no')
              -&gt;add('reg_no', 'validFormat',[
                      'rule' =&gt; '/^([ABCD]{2,2}[0-9]{4,4})$/i',
                      'message' =&gt; 'Please enter a valid serial number.'
              ]);
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <blockquote>
    <p>Method /^([ABCD]{2,2}[0-9]{4,4})$/i does not exist.</p>
  </blockquote>
  
  <p>Also, there is no mention of regular expressions in <a href="http://book.cakephp.org/3.0/en/core-libraries/validation.html" rel="noreferrer">Cake 3.0 validation Documentation</a> unlike <a href="http://book.cakephp.org/2.0/en/models/data-validation.html" rel="noreferrer">Cake 2 Documentation</a>.</p>
  
  <p>Has this been moved or modified?</p>