Hi, I have problem with TinyMCE editor. I have form with few text fields and textarea (tinymce), and enabled client validation. When I click save button validation occures on all text fields, but it takes 2 click to validate tinymce content. Furthermore, validation shows message only when field is empty, or if condition is not satisfied (just for test causes, max 5 characters can be entered), but when I enter right number of characters ( less then 5 ), error message stays.
Here's code sample:
<%Html.EnableClientValidation(); %>
<%= Html.ValidationSummary(true, "Na stranici postoje greške.", new { @style = "color: red;" })%></p>
<% using (Html.BeginForm("Create", "Article", FormMethod.Post, new { enctype = "multipart/form-data" }))
{ %>
<fieldset>
<legend>Podaci za Aranžman</legend>
<label class="EditLabel" for="name">
Opis</label>
<br />
<%= Html.TextAreaFor(Model => Model.Description, new { style = "width: 100%; height: 350px;", @class = "tinymce" })%>
<%= Html.ValidationMessageFor(Model => Model.Description, "", new { @style = "color: red;" })%>
<p>
<input type="submit" value="Sačuvaj aranžman" />
</p>
</fieldset>
<% } %>
and the property
[Required(ErrorMessage = "Unesi opis")]
[StringLength(5, ErrorMessage = "Opis mora imati manje od 5 znakova")]
public string Description { get; set; }
Any suggestions???