diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php index 496dbc7..75ce239 100644 --- a/vendor/antgoods/goods/src/models/ars/Attribute.php +++ b/vendor/antgoods/goods/src/models/ars/Attribute.php @@ -55,9 +55,12 @@ class Attribute extends \yii\db\ActiveRecord */ public function checkNegative($attribute, $params) { - if ((integer)$this->$attribute < 0) { + if ($this->$attribute < 0) { $this->addError($attribute, "不得为负数"); } + if ($this->$attribute > 65535) { + $this->addError($attribute, "不得大于65535"); + } } /**