Skip to content

Commit aed2f4e

Browse files
committed
Remove unnecessary slash at end of URL regex
1 parent 6fff902 commit aed2f4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/validators/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/go-playground/validator/v10"
77
)
88

9-
const urlRegex = `^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/`
9+
const urlRegex = `^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$`
1010

1111
// URL validates a web URL.
1212
func URL(fl validator.FieldLevel) bool {

0 commit comments

Comments
 (0)