1. 首页
  2. 主题
  3. Go语言

GO大佬们啊,进来看看我这问题。

zhangyasong · · 1211 次点击
![微信图片_20190704101408.png](https://static.studygolang.com/190704/7965d1231ab42ea74b721c70bc1bf5d1.png)![微信图片_20190704101453.png](https://static.studygolang.com/190704/8951598eab3451aefbcccceefe184384.png) 这个验证写法我试了不行,我的需求是想要在bind的时候验证这个OrderDeliveryItemInput 数组 ,验证数组len不能为0,有没有大神知道怎么写吗? 用的是这个 validator "gopkg.in/go-playground/validator.v9" 图片的这个写法是有问题的,验证了 不行,所以 看看大家的看法和意见。。
怎么验证的,验证数据格式是什么样的?
#1
更多评论
{ "excompanyName": "百世快递", "excompanyCode": "HTKY", "invoiceNo": "20190325002", "state": "SaleShippingWaiting", "deliveryItems": [] } 这样子的数据
#2
gopkg.in/go-playground/validator.v9 这个库里面不识别array tag 吧。你是不是看错库了?
#3

用户登录

没有账号?注册

今日阅读排行

    加载中

一周阅读排行

    加载中