Skip to content

Commit 7363222

Browse files
committed
chore: update comments
1 parent 95d218d commit 7363222

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

okta/utils/utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,13 +715,15 @@ func LinksValue(links interface{}, keys ...string) string {
715715
return LinksValue(l[keys[0]], keys[1:]...)
716716
}
717717

718-
// StrMaxLength updated implementation to count runes instead of bytes (https://github.com/okta/terraform-provider-okta/issues/2396)
718+
// StrMaxLength validates that the string is not longer than the specified maximum length.
719719
func StrMaxLength(max int) schema.SchemaValidateDiagFunc {
720720
return func(i interface{}, k cty.Path) diag.Diagnostics {
721721
v, ok := i.(string)
722722
if !ok {
723723
return diag.Errorf("expected type of %s to be string", k)
724724
}
725+
726+
// https://github.com/okta/terraform-provider-okta/issues/2396
725727
runes := []rune(v)
726728
if len(runes) > max {
727729
return diag.Errorf("%s cannot be longer than %d runes", k, max)

0 commit comments

Comments
 (0)