I have a form which is a jsrender template
<script id="editTemplate" type="text/x-jsrender">
<div>
<form id="myEditForm" method="POST" action="">
<table>
<tr>
<td>
Id:
</td>
<td>
<input type="text" name="id" value="{{>id}}" class="required" />
</td>
</tr>
<tr>
<td>
Name:
</td>
<td>
<input type="text" name="name" value="{{>name}}" class="required" />
</td>
</tr>
<td>
<input type="submit" value="submit" />
</td>
</tr>
</form>
I tried to add bassistance plugin based validation to the input fields but as the form is a jsrender template it is not working. any idea how to implement it???
The problem was i was adding the validation logic in the section of the html page where i created the form.
Validations could only be applied to the form once the template was compiled which happened in a seperate js file so, i added the validation code after the jsrender template was compiled ie., after these line in the js file
and now it works like charm:)