MCPcopy Create free account
hub / github.com/goadesign/goa / hasLengthValidation

Function hasLengthValidation

expr/example.go:126–131  ·  view source on GitHub ↗
(a *AttributeExpr)

Source from the content-addressed store, hash-verified

124}
125
126func hasLengthValidation(a *AttributeExpr) bool {
127 if a.Validation == nil {
128 return false
129 }
130 return a.Validation.MinLength != nil || a.Validation.MaxLength != nil
131}
132
133func hasEnumValidation(a *AttributeExpr) bool {
134 return a.Validation != nil && len(a.Validation.Values) > 0

Callers 2

ExampleMethod · 0.85
NewLengthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected