public function checkCondition($value) { if (parent::checkCondition($value)) { return true; } if (!is_string($value)) { return false; } if (!preg_match('#^([0-9]+)\\s*,\\s*([0-9]+)$#', $value, $matches)) { return false; } $precision = (int) $matches[1]; $scale = (int) $matches[2]; return $precision >= 1 && $precision <= $this->maxPrecision && $scale >= 0 & $scale <= $this->maxScale; }
/** * Constructs a null type length condition. */ public function __construct() { parent::__construct(true); }