We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 091d9ea commit 665baffCopy full SHA for 665baff
helper/validation/strings_test.go
@@ -243,6 +243,25 @@ func TestValidationStringIsWhiteSpace(t *testing.T) {
243
}
244
245
246
+func TestValidationStringLenBetween(t *testing.T) {
247
+ runTestCases(t, []testCase{
248
+ {
249
+ val: "abc",
250
+ f: StringLenBetween(1, 5),
251
+ },
252
253
+ val: "InvalidValue",
254
255
+ expectedErr: regexp.MustCompile(`expected length of [\w]+ to be in the range \(1 \- 5\), got InvalidValue`),
256
257
258
+ val: 1,
259
260
+ expectedErr: regexp.MustCompile(`expected type of [\w]+ to be string`),
261
262
+ })
263
+}
264
+
265
func TestValidationStringIsBase64(t *testing.T) {
266
cases := map[string]struct {
267
Value interface{}
0 commit comments