Unobtrusive Client Validation without accepting model
- by user1010609
I have simple form like this which accepts only two values string action and editText.Is there a way to enable Unobtrusive Client Validation on this without Data Annotations? Or do I have to accept model and use Data Annotations? I just need it to make sure editText is atleast 5 chars long.
@using (Ajax.BeginForm("Action", "Controller", null, new AjaxOptions { OnFailure = "error", UpdateTargetId = "Pcedit" + @Model.ID}))
{
<textarea rows="3" cols="2" name="editText" style="width:100%;"></textarea>
<br />
<input type="submit" name="action" value="Save"/>
<input type="submit" name="action" value="Cancel"/>
}