Commits

Mark Lavin committed 0281a90

Remove the error state if the input field is empty.

Comments (0)

Files changed (1)

selectable/static/js/jquery.dj.selectable.js

                 source: dataSource,
                 change: function(event, ui) {
                     $(input).removeClass('ui-state-error');
-                    if (!ui.item) {
+                    if ($(input).val() && !ui.item) {
                         if (!allowNew) {
                             $(input).addClass('ui-state-error');
                         }