-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Milestone
Description
Is your feature request related to a problem? Please describe.
I am using ASP.NET Core and tries to validate my view model using the UrlAttribute but my property is of the Uri data type.
Describe the solution you'd like
UrlAttribute could work on the Uri data type too, not only the string data type.
Additional context
using System.ComponentModel.DataAnnotations;
namespace Example.Models;
public class ExampleModel
{
[Url]
public Uri Website { get; set; }
}"The Website field is not a valid fully-qualified http, https, or ftp URL."
DanDiplo, TobbenTM, glen-84, fredrikahs, georgii-sirotkin and 4 more