diff --git a/internal/templates/rtp20022/validate.tgo b/internal/templates/rtp20022/validate.tgo index 2930cc4..28ee0a2 100644 --- a/internal/templates/rtp20022/validate.tgo +++ b/internal/templates/rtp20022/validate.tgo @@ -137,7 +137,7 @@ import ( } {{- end }} {{- if .Restriction.Length }} - if err := rtp.ValidateLength(string(v), {{ .Restriction.MinLength.Value }}); err != nil { + if err := rtp.ValidateLength(string(v), {{ .Restriction.Length.Value }}); err != nil { return err } {{- end }}