I have the following class:
using System.ComponentModel.DataAnnotations;
public class MyClass
{
[Required]
public string CallBack { get; set; }
}
how can I add validation to check for valid uri? thanks!
I have the following class:
using System.ComponentModel.DataAnnotations;
public class MyClass
{
[Required]
public string CallBack { get; set; }
}
how can I add validation to check for valid uri? thanks!
[Url]
attribute is what you need.
Or you can create custom validation. You can find way how to do it here