1
0
mirror of synced 2025-01-19 15:01:40 +03:00
doctrine2/classes/Validator/Range.class.php
doctrine 571cb46726
2006-04-13 20:37:28 +00:00

32 lines
638 B
PHP

<?php
class Doctrine_Validator_Range {
/**
* @param integer $max
*/
public function setMin($min) {
$this->min = $min;
}
/**
* @param integer $max
*/
public function setMax($max) {
$this->max = $max;
}
/**
* @param Doctrine_Record $record
* @param string $key
* @param mixed $value
* @return boolean
*/
public function validate(Doctrine_Record $record, $key, $value) {
if($var < $this->min)
return false;
if($var > $this->max)
return false;
return true;
}
}
?>