| 160 | } |
| 161 | |
| 162 | func (info *CrudInfo) GetWebProtoValidation() string { |
| 163 | if info == nil { |
| 164 | return "" |
| 165 | } |
| 166 | if info.ProtoType == "string" { |
| 167 | return fmt.Sprintf(`[(validate.rules).string.min_len = 1, (tagger.tags) = "uri:\"%s\""]`, info.ColumnNameCamelFCL) |
| 168 | } |
| 169 | return fmt.Sprintf(`[(validate.rules).%s.gt = 0, (tagger.tags) = "uri:\"%s\""]`, info.ProtoType, info.ColumnNameCamelFCL) |
| 170 | } |
| 171 | |
| 172 | func getCommonHandlerStructCodes(data tmplData, jsonNamedType int) (string, error) { |
| 173 | newFields := []tmplField{} |