jquery-validation: Conflict between validate and jeditable plugins: "Cannot read property 'settings' of undefined"

If you have an editable element under a validate form, you get an error.

<form id="form">
...
<div id="editable">Edit in place</div>
</form>

<script>
$(function(){
  $('#form').validate();
  $('#editable').editable('http://www.example.org/save');
});

When clicking on the editable, it generates a form+input field and the validation plugin attaches to this field. In the delegate method, which does not check if the form has a validator before applying it.

The fix seems to be trivial, add a test

if (!validator) return;

Will clone+pull request

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 23

Most upvoted comments

@achirkof There still seems to be some issues here. See my comment vitalets/x-editable#384