1
0
mirror of synced 2024-11-24 12:56:01 +03:00

Merge pull request #76 from Neur0toxine/master

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

View File

@ -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|ru))/?$`)
func setValidation() {
if v, ok := binding.Validator.Engine().(*validator.Validate); ok {