title: How to logically compare values (numbers) field values in CakePHP 3 validation
body: <p>I'm trying to use the <a href="http://api.cakephp.org/3.1/source-class-Cake.Validation.Validation.html#_comparison" rel="nofollow">comparison rule</a> but seems am missing something or not doing it right. Basically what I need is validation to check that the value of <strong>small_size</strong> is less or equal to <strong>big_size</strong>. </p>
  
  <p>But this isn't working, am currently getting the error regardless of the sizes.</p>
  
  <p>In the <strong>Table</strong>:</p>
  
  <pre><code>     ...
       $validator
          -&gt;add('small_size', 'valid', ['rule' =&gt; 'numeric'])
          -&gt;requirePresence('small_size', 'create')
          -&gt;notEmpty('small_size')
          -&gt;add('small_size', 'comparison', [
              'rule' =&gt; ['comparison', 'big_size', '&lt;='],
              'message' =&gt; 'Small size cannot be more than the Big size.'
          ]);
      return $validator;
  }
  
  public function buildRules(RulesChecker $rules)
  {
      $rules-&gt;add($rules-&gt;existsIn(['Entity_id'], 'Entity'));
      return $rules;
  }
  </code></pre>
  
  <p>Some help on this will be much appreciated.</p>