// +---------------------------------------------------------------------- namespace app\validate\admin\order; use think\Validate; /** * * Class StoreOrderValidate * @package app\validates\admin */ class StoreOrderValidate extends Validate { protected $rule = [ 'order_id' => ['require','length'=>'1,32','alphaNum'], 'total_price' => ['require','float'], 'total_postage' => ['require','float'], 'pay_price' => ['require','float'], 'pay_postage' => ['require','float'], 'gain_integral' => ['float'], ]; protected $message = [ 'order_id.require' => '订单号必须存在', 'order_id.length' => '订单号有误', 'order_id.alphaNum' => '订单号必须为字母和数字', 'total_price.require' => '订单金额必须填写', 'total_price.float' => '订单金额必须为数字', 'pay_price.require' => '订单金额必须填写', 'pay_price.float' => '订单金额必须为数字', 'pay_postage.require' => '订单邮费必须填写', 'pay_postage.float' => '订单邮费必须为数字', 'gain_integral.float' => '赠送积分必须为数字', ]; protected $scene = [ ]; }