1
0
mirror of synced 2024-11-28 06:26:03 +03:00

Improved retailCRM URL validation

This commit is contained in:
Pavel 2019-06-25 11:04:34 +03:00
parent 7168a4a4da
commit b148cae917

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