/**
  * @inheritdoc
  */
 public function validate($value, Context $context)
 {
     $reference = $context->param(self::PARAM_REFERENCE);
     $context->message_args[self::MESSAGE_ARG_REFERENCE] = $reference;
     $context->message_args[self::MESSAGE_ARG_VALUE_TYPE] = Render::render_type($reference);
     return $this->compare($value, $reference);
 }
Ejemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function validate($value, Context $context)
 {
     $min = $context->param(self::PARAM_MIN);
     $max = $context->param(self::PARAM_MAX);
     $context->message_args[self::MESSAGE_ARG_MIN] = $min;
     $context->message_args[self::MESSAGE_ARG_MAX] = $max;
     $context->message_args[self::MESSAGE_ARG_VALUE_TYPE] = Render::render_type($min);
     return $this->compare($value, $min, $max);
 }