OrderValidate.php 776 字节
<?php
/**
 * Created by PhpStorm.
 * User: 29925
 * Date: 2018/7/21
 * Time: 14:59
 */

namespace api\portal\validate;

use think\Validate;

class OrderValidate extends Validate
{
    protected $rule = [
        'order_sn' => 'require',
        'user_id' => 'require',
        'type' => 'in:1,2,3',
        'need_id' => 'require',
//        'get_id' => 'in:1,2',
        'money' => 'require',
    ];
    protected $message = [
        'order_sn.require' => '订单号不能为空!',
        'user_id.require' => '用户ID不能为空!',
        'type.require' => '订单类型不能为空!',
        'need_id.require' => '需求id不能为空!',
//        'get_id.require' => '类型不能为空!',
        'money.require' => '订单价格不能为空!',

    ];
}