ARBiz::rules PHP Method

rules() public method

public rules ( )
    public function rules()
    {
        return array(array('title,username,password,contact,mobile,bank_no,bank_name,bank_child,bank_user', 'required', 'on' => 'sell,update'), array('examine_status, display', 'numerical', 'integerOnly' => true), array('username, password, contact, bank_no', 'length', 'max' => 32), array('title, license_photo, bank_name, bank_child, examine_reason', 'length', 'max' => 128), array('phone, bank_user', 'length', 'max' => 18), array('mobile', 'checkMobile'), array('create_id, examine_id, create_time, update_time', 'length', 'max' => 10), array('license_photo', 'file', 'types' => 'jpg, gif, png', 'maxSize' => 1024 * 1024 * 2, 'tooLarge' => '文件超过 2MB. 请上传小一点儿的文件.', 'allowEmpty' => true, 'on' => 'sell'), array('id, username, password, title, license_photo, contact, phone, mobile, bank_user, bank_name, bank_child, bank_no, create_id, examine_status, examine_id, examine_reason, create_time, update_time, display', 'safe'));
    }