Merge pull request #9 from Neur0toxine/master

Improved retailCRM URL validation
This commit is contained in:
Alex Lushpai 2019-06-28 09:50:23 +03:00 committed by GitHub
commit d4379d3726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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