I want to use a regex validator to ensure that a certain string variable contains the substring "www.youtube.com/watch?v="
, how would I do this?
[RegularExpression()]
[Required(ErrorMessage = "Youtube link is Required")]
[StringLength(100, ErrorMessage="Youtube link cannot exceed 50 characters")]
public string YoutubeLink { get; set; }