()
| 150 | } |
| 151 | |
| 152 | func (info *CrudInfo) GetGRPCProtoValidation() string { |
| 153 | if info == nil { |
| 154 | return "" |
| 155 | } |
| 156 | if info.ProtoType == "string" { |
| 157 | return `[(validate.rules).string.min_len = 1]` |
| 158 | } |
| 159 | return fmt.Sprintf(`[(validate.rules).%s.gt = 0]`, info.ProtoType) |
| 160 | } |
| 161 | |
| 162 | func (info *CrudInfo) GetWebProtoValidation() string { |
| 163 | if info == nil { |