/**
  * @inheritdoc
  */
 public function rules()
 {
     $ownValidators = array('title' => array(array('required'), array('sanitize'), array('type', array('type' => 'string')), array('length', array('min' => 5, 'max' => 50))), 'email' => array(array('required'), array('sanitize'), array('type', array('type' => 'string')), array('length', array('min' => 5, 'max' => 50)), array('email')), 'content' => array(array('required'), array('sanitize', array('allowedTags' => '<a>')), array('type', array('type' => 'string')), array('length', array('min' => 10, 'max' => pow(2, 16)))));
     $parentValidators = parent::rules();
     $validators = array_merge($parentValidators, $ownValidators);
     return $validators;
 }
 /**
  * @inheritdoc
  */
 public function rules()
 {
     $ownValidators = array('name' => array(array('required'), array('sanitize'), array('type', array('type' => 'string')), array('length', array('min' => 2, 'max' => 50))), 'email' => array(array('required'), array('sanitize'), array('type', array('type' => 'string')), array('length', array('min' => 5, 'max' => 50)), array('email', array('allowEmpty' => true))), 'message' => array(array('required'), array('sanitize', array('allowedTags' => '<a>')), array('type', array('type' => 'string')), array('length', array('min' => 5, 'max' => pow(2, 16)))), 'postId' => array(array('required'), array('sanitize'), array('type', array('type' => 'integer')), array('value', array('min' => 0, 'max' => 4294967295)), array('referencedField', array('modelClass' => 'Post', 'attribute' => 'id'))));
     $parentValidators = parent::rules();
     $validators = array_merge($parentValidators, $ownValidators);
     return $validators;
 }
 /**
  * @inheritdoc
  */
 public function rules()
 {
     // using default validator to set default values generated using functions
     $ownValidators = array('key' => array(array('default', array('value' => static::generateRandomKey())), array('required'), array('type', array('type' => 'string')), array('length', array('exact' => static::KEY_LENGTH)), array('unique')), 'action' => array(array('required'), array('type', array('type' => 'string')), array('length', array('min' => 8, 'max' => 30))), 'userAgent' => array(array('default', array('value' => static::getUserAgent())), array('required'), array('type', array('type' => 'string')), array('length', array('min' => 2, 'max' => 255))), 'userIP' => array(array('default', array('value' => static::getUserIP())), array('required'), array('type', array('type' => 'integer'))), 'expirationTime' => array(array('default', array('value' => static::getExpirationTime())), array('required'), array('type', array('type' => 'integer'))));
     $parentValidators = parent::rules();
     $validators = array_merge($parentValidators, $ownValidators);
     return $validators;
 }