
这个验证写法我试了不行,我的需求是想要在bind的时候验证这个OrderDeliveryItemInput 数组 ,验证数组len不能为0,有没有大神知道怎么写吗?
用的是这个 validator "gopkg.in/go-playground/validator.v9"
图片的这个写法是有问题的,验证了 不行,所以 看看大家的看法和意见。。
更多评论
{
"excompanyName": "百世快递",
"excompanyCode": "HTKY",
"invoiceNo": "20190325002",
"state": "SaleShippingWaiting",
"deliveryItems": []
}
这样子的数据
#2
gopkg.in/go-playground/validator.v9 这个库里面不识别array tag 吧。你是不是看错库了?
#3