Say I have this Jquery code:
$('.additems').click(function () {
$table = $('.item');
$table.append('<tr> <td> <input type="textbox" name="test"> </td> </tr>');
});
And I want to enable the validation from the [Required]
attribute of my model who contains the property test
I tried adding the autogenerated html from the @Html.ValidationMessageFor
which is
<span class="field-validation-valid" data-valmsg-for="test" data-valmsg-replace="true"></span>
but it's not working.
How do I do it?