public function __construct(RedBeanModel $model = null, $attributeName = null) { $this->maxLength = 18; parent::__construct($model, $attributeName); if ($model !== null) { $validators = $model->getValidators($attributeName); foreach ($validators as $validator) { if ($validator instanceof RedBeanModelNumberValidator) { if ($validator->precision !== null) { $this->precisionLength = $validator->precision; } } } } }
public function __construct(RedBeanModel $model = null, $attributeName = null) { parent::__construct($model, $attributeName); if ($model !== null) { $validators = $model->getValidators($attributeName); foreach ($validators as $validator) { if ($validator instanceof CNumberValidator) { if ($validator->min !== null) { $this->minValue = $validator->min; } if ($validator->max !== null) { $this->maxValue = $validator->max; } } } } }
public function __construct(RedBeanModel $model = null, $attributeName = null) { $this->maxLength = 24; parent::__construct($model, $attributeName); }