From b2d50d654d094535cba90b93b82cedd35100750f Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Fri, 22 Nov 2019 13:54:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=8B=E6=9C=BA=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vendor/antgoods/goods/src/models/ars/Supplier.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php index e30b599..a19f7dd 100644 --- a/vendor/antgoods/goods/src/models/ars/Supplier.php +++ b/vendor/antgoods/goods/src/models/ars/Supplier.php @@ -40,6 +40,9 @@ class Supplier extends \yii\db\ActiveRecord [['is_delete'], 'integer'], [['name', 'full_name', 'address'], 'string', 'max' => 50], [['phone'], 'string', 'max' => 20], + ['phone', 'filter', 'filter' => 'trim'], + ['phone','match','pattern'=>'/^[1][34578][0-9]{9}$/'], + ['phone', 'unique', 'targetClass' => '\antgoods\goods\models\ars\Supplier', 'message' => '手机号已被使用'], ]; }