On a button click I am hiding all the field validator error by :
$(".field-validation-error").hide()
However I would need this to be activated for some of the fields but not for all.
Let's say I would need this to be activated for the following control.
<td>
@Html.TextBoxFor(m => m.BookTitle, new { @id = "PTitle" })
</td>
<td style="color: Red; display: block; margin-right:20px;">
@Html.ValidationMessageFor(m => m.BookTitle, "", new { @id = "pTitleModelError" })
</td>
I tried enabling it like this using Jquery,
$("#pTitleModelError .field-validation-error").show();
Without any luck. Am I missing something?
$(".field-validation-error").hide(); $("#pTitleModelError.field-validation-error").show();
Its not validating that field. – TBA 14 hours ago