Darren Rockett

Darren Rockett

  • NA
  • 1
  • 754

Model validation with data annotations

Jul 2 2015 4:01 AM
I am looking for a working example of the above, so far I have the following, (the model class is obviously separate), not sure how best to proceed
 
public class ApplicantMetadata
{
[Required]
public int APPLICANT_ID;
[Required]
[StringLength(100)]
public string APPLICANT_Title; }
 
[MetadataType(typeof(ApplicantMetadata))]
public partial class Applicant { }

Answers (1)