public function evaluate($input = null)
{
// Set the input, if passed
if (null !== $input) {
$this->input = $input;
}
$nums = explode('|', $this->value);
// Set the default message
if (null === $this->defaultMessage) {
if ($this->condition) {
$this->defaultMessage = I18n::factory()->__('The value must be between %1 and %2.', $nums);
} else {
$this->defaultMessage = I18n::factory()->__('The value must not be between %1 and %2.', $nums);
}
}
// Evaluate the input against the validator
if (($this->input > $nums[0] && $this->input < $nums[1]) == $this->condition) {
$this->result = true;
} else {
$this->result = false;
}
return $this->result;
}