improve validate testing with examples

also simplified structure of test cases and failure logging
This commit is contained in:
Aneurin Barker Snook
2024-07-18 06:53:20 +01:00
parent 4c99b5a654
commit a9c1184d6b
14 changed files with 417 additions and 428 deletions
+2 -2
View File
@@ -2,8 +2,8 @@ package validate
// Validation error.
var (
ErrMustBeLonger = NewError("must be at least %d characters")
ErrMustBeShorter = NewError("must be no more than %d characters")
ErrMustBeLonger = NewError("must contain at least %d characters")
ErrMustBeShorter = NewError("must contain no more than %d characters")
)
// MaxLength validates the length of a string as being less than or equal to a given maximum.