/**
  * {@inheritDoc}
  */
 public function validate($value)
 {
     if (is_int($this->rule->getMax())) {
         if (count($value) > $this->rule->getMax()) {
             $this->setMessage($this->rule->getMaxMessage());
             return false;
         }
     }
     if (is_int($this->rule->getMin())) {
         if (count($value) < $this->rule->getMin()) {
             $this->setMessage($this->rule->getMinMessage());
             return false;
         }
     }
     return true;
 }