Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I make jquery validation work with my jedatible plugin?
    primarykey
    data
    text
    <p>I’m trying to implement jquery validation with my jeditable plugin.. As jeditable is somewhat new to me I thought I’d add try using code I found on the forum. Here’s my original code that works fine except for validation.</p> <pre><code> &lt;script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../../Scripts/jquery.jeditable.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="../../Scripts/jquery.ui.datepicker.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $(".display-label").editable("/Course/RubricsEdit"); $(".text").editable("/Course/RubricsEdit", { submitdata: { DepartmentId: function () { return $("#DepartmentId").val(); }, RecordType: "DEPARTMENT" } }); </code></pre> <p>Then I tried this:</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { $(".display-label").editable("/Course/RubricsEdit"); $(".text").editable("/Course/RubricsEdit", { submitdata: { DepartmentId: function () { return $("#DepartmentId").val(); }, RecordType: "DEPARTMENT" } }); $(".text").editable("/Course/RubricsEdit", { submitdata: function (settings, td) { var input = $(td).find('input'); $(this).validate({ rules: { 'nameofinput': { number: true } }, messages: { 'actionItemEntity.name': { number: 'Only numbers are allowed' } } }) return ($(this).valid()); } }); }); &lt;/script&gt; </code></pre> <p>Still works but no validation happens.. is there a way to make validation work with my jeditable plugin?</p> <p>UPDATE: So I tried this:</p> <pre><code> &lt;script type="text/javascript"&gt; $(document).ready(function () { $(this).validate({ rules: { submitdata: { number: true } }, messages: { submitdata: { number: 'Only numbers are allowed' } } }); $(".display-label").editable("/Course/RubricsEdit"); $(".text").editable("/Course/RubricsEdit", { submitdata: { DepartmentId: function () { return $("#DepartmentId").val(); }, RecordType: "DEPARTMENT" } }); }); &lt;/script&gt; </code></pre> <p>…and got an error message:</p> <p>Microsoft JScript runtime error: Object doesn't support property or method 'validate'. What could I be missing?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload