0

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!

1 Answers1

1

[Url] attribute is what you need.

url attribute

Or you can create custom validation. You can find way how to do it here

Mateech
  • 1,010
  • 1
  • 11
  • 26