public function checkAdd(&$model, array $param) { if (Validate::isNullStr($_POST['name'])) { $this->message[] = '物流公司名称不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['url'])) { $this->message[] = '物流公司网址不得为空'; $this->flag = false; } if (Validate::checkStrLength($_POST['url'], 40, 'max')) { $this->message[] = '品牌网址不得大于40位'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_in'])) { $this->message[] = '省内起步费用必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_out'])) { $this->message[] = '省外起步费用必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_add'])) { $this->message[] = '额外费用必须为数字'; $this->flag = false; } if ($model->isOne($param)) { $this->message[] = '该物流公司已被占用'; $this->flag = false; } return $this->flag; }
public function checkUpdate() { if (Validate::checkStrLength($_POST['re_content'], 200, 'max')) { $this->message[] = '回复评价不得大于200位'; $this->flag = false; } return $this->flag; }
public function checkUpdate() { if (Validate::checkStrLength($_POST['info'], 200, 'max')) { $this->message[] = '导航信息不得大于200位'; $this->flag = false; } return $this->flag; }
public function checkAdd(&$model, array $param) { if (Validate::isNullStr($_POST['name'])) { $this->message[] = '商品名不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['nav'])) { $this->message[] = '种类不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['sn'])) { $this->message[] = '编号不得为空'; $this->flag = false; } if (!Validate::isNumeric($_POST['weight'])) { $this->message[] = '商品重量必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_sale'])) { $this->message[] = '商品销售价必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_market'])) { $this->message[] = '商品成本价必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['price_cost'])) { $this->message[] = '商品成本价必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['inventory'])) { $this->message[] = '库存必须为数字'; $this->flag = false; } if (!Validate::isNumeric($_POST['warn_inventory'])) { $this->message[] = '库存告急必须为数字'; $this->flag = false; } if (Validate::checkStrLength($_POST['name'], 20, 'max')) { $this->message[] = '商品名不得大于20位'; $this->flag = false; } if ($model->isOne($param)) { $this->message[] = '商品已被占用'; $this->flag = false; } return $this->flag; }
public function checkUpdate(&$model) { if (Validate::isNullStr($_POST['link'])) { $this->message[] = '链接地址不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['thumb'])) { $this->message[] = '图片地址不得为空'; $this->flag = false; } if (Validate::checkStrLength($_POST['link'], 40, 'max')) { $this->message[] = '链接地址不得大于50位'; $this->flag = false; } return $this->flag; }
public function checkUpdate(&$model) { if (Validate::isNullStr($_POST['url'])) { $this->message[] = '品牌网址不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['type'])) { $this->message[] = '品牌类型不得为空'; $this->flag = false; } if (Validate::checkStrLength($_POST['info'], 200, 'max')) { $this->message[] = '品牌简介不得大于20位'; $this->flag = false; } if (Validate::checkStrLength($_POST['url'], 40, 'max')) { $this->message[] = '品牌网址不得大于20位'; $this->flag = false; } return $this->flag; }
public function checkAdd(&$model, array $param) { if (Validate::checkStrLength($_POST['name'], 20, 'max')) { $this->message[] = '售后服务名称不得超过20位'; $this->flag = false; } if (Validate::isNullStr($_POST['name'])) { $this->message[] = '售后服务名称不得为空'; $this->flag = false; } if (Validate::isNullStr($_POST['content'])) { $this->message[] = '售后服务内容不得为空'; $this->flag = false; } if ($model->isOne($param)) { $this->message[] = '该售后服务已被占用'; $this->flag = false; } return $this->flag; }
public function checkAdd(&$model, array $param) { if (Validate::checkStrLength($_POST['name'], 2, 'min')) { $this->message[] = '属性名长度不得小于2位'; $this->flag = false; } if (Validate::isNullStr($_POST['name'])) { $this->message[] = '属性名不得为空'; $this->flag = false; } if (Validate::checkStrLength($_POST['name'], 4, 'max')) { $this->message[] = '属性名长度不得大于4位'; $this->flag = false; } if ($model->isOne($param)) { $this->message[] = '属性名已被占用'; $this->flag = false; } return $this->flag; }
public function checkLogin(&$model, array $param) { if (Validate::checkStrLength($_POST['user'], 2, 'min')) { $this->message[] = '管理员用户名长度不得小于2位'; $this->flag = false; } if (Validate::checkStrLength($_POST['user'], 20, 'max')) { $this->message[] = '管理员用户名长度不得大于20位'; $this->flag = false; } if (Validate::checkStrLength($_POST['pwd'], 6, 'min')) { $this->message[] = '密码不得小于6位'; $this->flag = false; } if (!$model->isOne($param)) { $this->message[] = '用户名或密码不正确'; $this->flag = false; } if (!Validate::checkStrEquals(strtolower($_POST['validateCode']), $_SESSION['validateCode'])) { $this->message[] = '验证码不正确'; $this->flag = false; } return $this->flag; }
public function checkAdd(&$model, array $param) { if (Validate::isNullStr($_POST['name'])) { $this->message[] = '收货人长度不得小于2位'; $this->flag = false; } if (!Validate::isLength($_POST['code'], 6)) { $this->message[] = '邮政编码必须为6位'; $this->flag = false; } if (Validate::checkStrLength($_POST['name'], 20, 'max')) { $this->message[] = '收货人不得大于20位'; $this->flag = false; } if (!Validate::checkEmail($_POST['email'])) { $this->message[] = '邮箱格式不正确'; $this->flag = false; } if ($model->isOne($param)) { $this->message[] = '收货人已被占用'; $this->flag = false; } return $this->flag; }