You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed an interesting problem with placing span error element when using bootstrap "input-group" with "input-group-addon" on validation element. Inserting validation message actually breaks UI.
To be able to fix it, you need to override 2 things, in my case. Override of "insertValidationMessage" and "validationCore.init" function.
So I would propose a change in validationCore.init function:
var validationMessageElement = kv.insertValidationMessage(element);
// if we're told to use a template, make sure that gets rendered
// FIX: check if element is really created
if (validationMessageElement) { // <-------- this is block missing to avoid further errors in case of insertValidationMessage override
if (config.messageTemplate) {
ko.renderTemplate(config.messageTemplate, {
field: observable
}, null, validationMessageElement, 'replaceNode');
} else {
ko.applyBindingsToNode(validationMessageElement, {
validationMessage: observable
});
}
}
with this change it's possible to make override of insertValidationMessage function to be able to modify creation of validation message to your need.
P.S. not sure if this was already discussed
The text was updated successfully, but these errors were encountered:
I have noticed an interesting problem with placing span error element when using bootstrap "input-group" with "input-group-addon" on validation element. Inserting validation message actually breaks UI.
Screen shot: https://www.screencast.com/t/kcrVq80Cm
I have made fiddle: https://jsfiddle.net/keiserSoze/swovdh1s/
To be able to fix it, you need to override 2 things, in my case. Override of "insertValidationMessage" and "validationCore.init" function.
So I would propose a change in validationCore.init function:
with this change it's possible to make override of insertValidationMessage function to be able to modify creation of validation message to your need.
P.S. not sure if this was already discussed
The text was updated successfully, but these errors were encountered: