GingerSquirrel
5/20/2016 - 8:18 AM

This piece of code requires the checkbox to be true before submission on a C#.net MVC form.

This piece of code requires the checkbox to be true before submission on a C#.net MVC form.

[Display(Name = "Tick this box to confirm you have permission to pass the referrer's details on")]
[Range(typeof(bool), "true", "true", ErrorMessage = "Please confirm you have permission to pass these details on.")]
public bool ConfidentialEnquiry { get; set; }