@@ -18,7 +18,7 @@ func StringIsNotEmpty(i interface{}, k string) ([]string, []error) {
1818 }
1919
2020 if v == "" {
21- return nil , []error {fmt .Errorf ("expected %q to not be an empty string" , k )}
21+ return nil , []error {fmt .Errorf ("expected %q to not be an empty string, got %v " , k , i )}
2222 }
2323
2424 return nil , nil
@@ -97,7 +97,7 @@ func StringMatch(r *regexp.Regexp, message string) schema.SchemaValidateFunc {
9797 return nil , []error {fmt .Errorf ("invalid value for %s (%s)" , k , message )}
9898
9999 }
100- return nil , []error {fmt .Errorf ("expected value of %s to match regular expression %q" , k , r )}
100+ return nil , []error {fmt .Errorf ("expected value of %s to match regular expression %q, got %v " , k , r , i )}
101101 }
102102 return nil , nil
103103 }
@@ -118,7 +118,7 @@ func StringDoesNotMatch(r *regexp.Regexp, message string) schema.SchemaValidateF
118118 return nil , []error {fmt .Errorf ("invalid value for %s (%s)" , k , message )}
119119
120120 }
121- return nil , []error {fmt .Errorf ("expected value of %s to not match regular expression %q" , k , r )}
121+ return nil , []error {fmt .Errorf ("expected value of %s to not match regular expression %q, got %v " , k , r , i )}
122122 }
123123 return nil , nil
124124 }
@@ -157,7 +157,7 @@ func StringDoesNotContainAny(chars string) schema.SchemaValidateFunc {
157157 }
158158
159159 if strings .ContainsAny (v , chars ) {
160- es = append (es , fmt .Errorf ("expected value of %s to not contain any of %q" , k , chars ))
160+ es = append (es , fmt .Errorf ("expected value of %s to not contain any of %q, got %v " , k , chars , i ))
161161 return
162162 }
163163
0 commit comments