I`m new On Asp.net Mvc (4)
can I call a function to validate a model property ( It is more than REQUIRED , MAXLENGHT...)
e.g:
public class Movie
{
public int ID { get; set; }
[Required]
public string Title { get; set; }
[DataType(DataType.Date)]
public DateTime ReleaseDate { get; set; }
[Required]
public string Genre { get; set; }
[Range(1, 100)]
[DataType(DataType.Currency)]
public decimal Price { get; set; }
[StringLength(5)]
public string Rating { get; set; }
[***Call some function here***]
public string blabla{get;set;}
}
Or maybe another idea?