<?php
//广告验证类
class SellercateCheck extends Check {	
	public function addCheck(Model &$_model) {
		if (self::isNullString($_POST['name'])) {
			$this->_message[] = '商家分类不能为空';
			$this->_flag = false;
		}
		if (self::checkStrLength($_POST['name'], 2, 'min')) {
			$this->_message[] = '商家分类不得小于2位！';
			$this->_flag = false;
		}			
		return $this->_flag;
	}
	
	public function updateCheck(Model &$_model) {
		if (self::isNullString($_POST['name'])) {
			$this->_message[] = '商家分类不得为空！';
			$this->_flag = false;
		}
		if (self::checkStrLength($_POST['name'], 2, 'min')) {
			$this->_message[] = '商家分类不得小于2位！';
			$this->_flag = false;
		}		
		return $this->_flag;
	}
}
?>