Skip to content

Commit facbca0

Browse files
authored
feat(form): error instead of debug if field not found
This improves #2484 to show an error instead of a debug info, because it is basically expected to always return an existing field
1 parent e146d70 commit facbca0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/definitions/behaviors/form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ $.fn.form = function(parameters) {
642642
if((t=$field.filter('[data-' + metadata.validate + '="'+ identifier +'"]')).length > 0 ) {
643643
return t;
644644
}
645-
module.debug('Field identifier not found.', identifier);
645+
module.error(error.noField.replace('{identifier}',identifier));
646646
return $('<input/>');
647647
},
648648
fields: function(fields) {
@@ -1629,6 +1629,7 @@ $.fn.form.settings = {
16291629
method : 'The method you called is not defined.',
16301630
noRule : 'There is no rule matching the one you specified',
16311631
oldSyntax : 'Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.',
1632+
noField : 'Field identifier {identifier} not found',
16321633
noElement : 'This module requires ui {element}'
16331634
},
16341635

0 commit comments

Comments
 (0)