Skip to content

Commit 9692e4f

Browse files
Merge pull request #44478 from BenjaminNolan/fix/grammar-in-validation-messages
2 parents 96c39eb + 7f8087e commit 9692e4f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/service/emr/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func validCustomAMIID(v any, k string) (ws []string, errors []error) {
1919

2020
if !regexache.MustCompile(`^ami\-[0-9a-z]+$`).MatchString(value) {
2121
errors = append(errors, fmt.Errorf(
22-
"%q must begin with 'ami-' and be comprised of only [0-9a-z]: %v", k, value))
22+
"%q must begin with 'ami-' and only contain [0-9a-z]: %v", k, value))
2323
}
2424

2525
return

internal/service/kms/validate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func validNameForDataSource(v any, k string) (ws []string, es []error) {
4242

4343
if !aliasNameRegex.MatchString(value) {
4444
es = append(es, fmt.Errorf(
45-
"%q must begin with 'alias/' and be comprised of only [0-9A-Za-z_/-]", k))
45+
"%q must begin with 'alias/' and only contain [0-9A-Za-z_/-]", k))
4646
}
4747
return
4848
}
@@ -56,7 +56,7 @@ func validNameForResource(v any, k string) (ws []string, es []error) {
5656

5757
if !aliasNameRegex.MatchString(value) {
5858
es = append(es, fmt.Errorf(
59-
"%q must begin with 'alias/' and be comprised of only [0-9A-Za-z_/-]", k))
59+
"%q must begin with 'alias/' and only contain [0-9A-Za-z_/-]", k))
6060
}
6161
return
6262
}

internal/verify/validate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func ValidLaunchTemplateID(v any, k string) (ws []string, errors []error) {
330330
errors = append(errors, fmt.Errorf("%q cannot be longer than 255 characters", k))
331331
} else if !regexache.MustCompile(`^lt\-[0-9a-z]+$`).MatchString(value) {
332332
errors = append(errors, fmt.Errorf(
333-
"%q must begin with 'lt-' and be comprised of only alphanumeric characters: %v", k, value))
333+
"%q must begin with 'lt-' and only contain alphanumeric characters: %v", k, value))
334334
}
335335
return
336336
}

0 commit comments

Comments
 (0)