i have a text area to which i have applied the ckeditor class. i want the text area as required field. I have added the code of the view. How can I achieve it? tried couple of solutions from CKEditor and ASP.Net MVC 3 RequiredAttribute, but no result.
@Html.LabelFor(model => model.faq_answer)
@Html.TextAreaFor(model => model.faq_answer, new { @class = "ckeditor form-control", @id = "faq_answer" })
@Html.ValidationMessageFor(model => model.faq_answer, "", new { @class = "text-danger" })
My model property
[Display(Name ="Answer")]
[Required(ErrorMessage ="Please Enter Answer")]
public string faq_answer { get; set; }