_validator($this->field, function ($field, $model, $param) { $value = $model->getAttribute($field); if ($value == null || round($value, $param) != $value) { return $this->addError('The param :attribute length error'); } return true; }, $this->model, $this->value); } }