From d4dceb4f0e39ab98251f14b036a7141d90d6548e Mon Sep 17 00:00:00 2001 From: Peter Sanchez Date: Mon, 22 Aug 2022 12:22:05 -0600 Subject: [PATCH] Adding specific message for invalid phone number validation --- validate/validate.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/validate/validate.go b/validate/validate.go index 7693417..ae6ad5d 100644 --- a/validate/validate.go +++ b/validate/validate.go @@ -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()) } -- 2.45.2