<?php

namespace app\common\validate;
use think\Validate;

class CompanyComment extends Validate
{
    // 验证规则
    protected $rule = [
        'id' => 'require|number',
        'info' => 'max:255',
        'images' => 'max:500',
    ];

    // 验证提示
    protected $message = [
        'id.require' => '请输入门店印象ID',
        'id.number' => '您输入的门店印象ID，必须是数字类型',
        'info.max' => '您输入的内容，必须小于255字符',
        'images.max' => '您输入的图片，必须小于500字符',
    ];

    // 应用场景
    protected $scene = [
        'add' => ['info','images'],
        'edit' => ['id','info','images'],
    ];
}