~netlandish/gobwebs

d4dceb4f0e39ab98251f14b036a7141d90d6548e — Peter Sanchez 2 years ago 1c9bd53
Adding specific message for invalid phone number validation
1 files changed, 2 insertions(+), 0 deletions(-)

M validate/validate.go
M validate/validate.go => validate/validate.go +2 -0
@@ 60,6 60,8 @@ func (cv *CustomValidator) Validate(i interface{}) error {
				emsg = lt.Translate("This field is required.")
			case "email":
				emsg = lt.Translate("Please enter a valid email address.")
			case "e164":
				emsg = lt.Translate("Please enter a valid phone number.")
			default:
				emsg = lt.Translate("Failed the '%s' tag.", err.Tag())
			}