improve validate testing with examples
also simplified structure of test cases and failure logging
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user