srkirkland / DataAnnotationsExtensions

Validation extensions for DataAnnotations, including optional MVC client validation implementations
https://dataannotationsextensions.apphb.com/
BSD 3-Clause "New" or "Revised" License
308 stars 86 forks source link

UrlOptions.OptionalProtocol doesn't work #58

Closed klyakh closed 8 years ago

klyakh commented 10 years ago

Using it in ASP.NET MVC 5.1 project (haven't tried to reproduce it on earlier versions).

Have the following attribute applied: [DataAnnotationsExtensions.Url(UrlOptions.OptionalProtocol)] public string Domain { get; set; }

If I enter "domain.com" it says "Please enter a valid URL." I guess it conflicts with standard DataType.Url validation.

srkirkland commented 8 years ago

Works for me on the old MVC3 stuff that is published now -- I'm working on an MVC5 version so I'll tag this to look into for that release