From b148cae917b1b69f8244f44b301516b7531089e4 Mon Sep 17 00:00:00 2001 From: Pavel Date: Tue, 25 Jun 2019 11:04:34 +0300 Subject: [PATCH] Improved retailCRM URL validation --- src/validator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validator.go b/src/validator.go index 63d0d1c..61b51b3 100644 --- a/src/validator.go +++ b/src/validator.go @@ -8,7 +8,7 @@ import ( "gopkg.in/go-playground/validator.v8" ) -var regCommandName = regexp.MustCompile(`https://?[\da-z.-]+\.(retailcrm\.(ru|pro|es)|ecomlogic\.com|simlachat\.com)`) +var regCommandName = regexp.MustCompile(`^https://?[\da-z.-]+\.(retailcrm\.(ru|pro|es)|ecomlogic\.com|simlachat\.com)/?$`) func setValidation() { if v, ok := binding.Validator.Engine().(*validator.Validate); ok {