Improved retailCRM URL validation

This commit is contained in:
Pavel 2019-06-25 14:32:27 +03:00
parent 2666bcef89
commit bb5a6d831d

View file

@ -9,7 +9,7 @@ import (
"gopkg.in/go-playground/validator.v9"
)
var regCommandName = regexp.MustCompile(`https://?[\da-z.-]+\.(retailcrm\.(ru|pro|es)|ecomlogic\.com|simlachat\.(com|ru))`)
var regCommandName = regexp.MustCompile(`^https://?[\da-z.-]+\.(retailcrm\.(ru|pro|es)|ecomlogic\.com|simlachat\.(com|ru))/?$`)
type defaultValidator struct {
once sync.Once