title: PHPActiveRecord validates_uniqueness_of not working
body: <p>I am currently getting the following error in my <strong>User</strong> model.</p>
  
  <pre><code>Slim Application Error
  The application could not run because of the following error:
  
  Details
  
  Type: ActiveRecord\UndefinedPropertyException
  Message: Undefined property: User-&gt;Array in /var/www/public_html/devsite/vendor/php-activerecord/php-activerecord/lib/Model.php on line 521
  File: /var/www/public_html/devsite/vendor/php-activerecord/php-activerecord/lib/Model.php
  Line: 521
  </code></pre>
  
  <p><strong>My model only crashes the program when I add the line below to it.</strong></p>
  
  <pre><code>static $validates_uniqueness_of = array(
        'username'
   );
  </code></pre>
  
  <p>If I remove the line above then the program runs again just fine.  So I know it has something to do with this.</p>
  
  <p>According to the documentation this should indeed be the format. 
  (<a href="http://www.phpactiverecord.org/projects/main/wiki/Validations#validates_uniqueness_of" rel="nofollow noreferrer">http://www.phpactiverecord.org/projects/main/wiki/Validations#validates_uniqueness_of</a>)</p>
  
  <p>Reference to the validate function from the library is below:</p>
  
  <p>Line 563 --
  <a href="https://github.com/jpfuentes2/php-activerecord/blob/master/lib/Validations.php" rel="nofollow noreferrer">https://github.com/jpfuentes2/php-activerecord/blob/master/lib/Validations.php</a></p>
  
  <p><strong>I'm using PHP Version 7.0.15-0 on ubuntu0.16.04.4</strong></p>
  
  <p>If this is truly a bug, does anyone have any workarounds?</p>