IntelliTect / Coalesce

Quickly build amazing web apps
https://intellitect.github.io/Coalesce/
Apache License 2.0
62 stars 22 forks source link

URL validation regex is wrong #325

Closed ascott18 closed 9 months ago

ascott18 commented 11 months ago

URL props generate this validation rule, which is wrong and doesn't allow for non-https URLs:

        url: val => !val || /^((http(s)|ftp):\/\/.)/.test(val) || "Website Url must be a valid URL.",
ascott18 commented 9 months ago

It was supposed to mirror this https://source.dot.net/#System.ComponentModel.Annotations/System/ComponentModel/DataAnnotations/UrlAttribute.cs,28cd905b8c77d3e0, but I failed