I know it is been answered before and there is lot of examples, but I just can not understand them and make them work. I work with a friend on project, but know he do not have time to explain how to do it.
I have this code on my model:
[Required(ErrorMessage = "You must accepted terms")]
[Display(Name = "Is Approve")]
public bool IsApprove { get; set; }
and this code on my view:
@Html.CheckBoxFor(m => m.IsApprove)<br /><br />
@Html.ValidationMessageFor(m => m.IsApprove)
I also have some Controllers
I want to show message for the user that he must accepted the terms after he submit the form if the checkbox is unchecked and submit the form if the checkbox is checked.
Is there some step by step guide to show how to this? I know from asp.net that I can do checks with Javascript or in the code behind, but I can not find out where to it on MVC