add max error validation
This commit is contained in:
parent
bf61b6c0ea
commit
548c086079
@ -16,7 +16,9 @@ type APIValidationError struct {
|
|||||||
func validationErrorMsg(field string, param string, tag string) string {
|
func validationErrorMsg(field string, param string, tag string) string {
|
||||||
switch tag {
|
switch tag {
|
||||||
case "min":
|
case "min":
|
||||||
return fmt.Sprintf("%s character min %s", field, param)
|
return fmt.Sprintf("%s character min %s character", field, param)
|
||||||
|
case "max":
|
||||||
|
return fmt.Sprintf("%s character max %s character", field, param)
|
||||||
case "required":
|
case "required":
|
||||||
return fmt.Sprintf("%s is %s", field, tag)
|
return fmt.Sprintf("%s is %s", field, tag)
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user