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