In our tests, we often get this error:
Uncaught TypeError: Cannot create property 'identifier' on boolean 'false'
From this code:
field: function(field, fieldName) {
...
if(!field.identifier) {
module.debug('Using field name as identifier', identifier);
field.identifier = identifier;
}
This happens when there are no validation rules defined and function argument field gets the value false. Most definitely, this condition should be checked.
change: function(event) {
var
$field = $(this),
$fieldGroup = $field.closest($group),
validationRules = module.get.validation($field) // FALSE RETURNED FROM HERE
;
if(settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) ) {
clearTimeout(module.timer);
module.timer = setTimeout(function() {
module.debug('Revalidating field', $field, module.get.validation($field));
module.validate.field( validationRules ); // FALSE PASSED HERE
}, settings.delay);
}
}
There should be a check
@jlukic should fix the validate error when there is search dropdown in form.
We have a simple fix: https://github.com/Semantic-Org/Semantic-UI/pull/4547