size = $size; return $this; } /** * Set the minimum and maximum size of the attribute. * * @param int $minimum * @param int $maximum * @return Rangable_Rule */ public function between($minimum, $maximum) { $this->minimum = $minimum; $this->maximum = $maximum; return $this; } /** * Set the minimum size the attribute. * * @param int $minimum * @return Rangable_Rule */ public function minimum($minimum) { $this->minimum = $minimum; return $this; } /** * Set the maximum size the attribute. * * @param int $maximum * @return Rangable_Rule */ public function maximum($maximum) { $this->maximum = $maximum; return $this; } /** * Set the validation error message. * * @param string $message * @return Rangable_Rule */ public function message($message) { return $this->wrong_size($message)->too_big($message)->too_small($message); } /** * Set the "wrong size" error message. * * @param string $message * @return Rangable_Rule */ public function wrong_size($message) { $this->wrong_size = $message; return $this; } /** * Set the "too big" error message. * * @param string $message * @return Rangable_Rule */ public function too_big($message) { $this->too_big = $message; return $this; } /** * Set the "too small" error message. * * @param string $message * @return Rangable_Rule */ public function too_small($message) { $this->too_small = $message; return $this; } }