I'm using knockout (3.0.0) with validation (1.0.2), trying to disable "tooltips" which ko-validation generates for a field when it contains an error:
Based on documentation , errorsAsTitle:false
should prevent tooltips from displaying, but it seems to ignore false
.
My current configuration
ko.validation.rules.required.message = 'Field(s) are required!';
ko.validation.configure({
registerExtenders: true,
messagesOnModified: true,
errorsAsTitle: false, //<-----problem here
insertMessages: false,
decorateElement: true,
errorElementClass: 'inputError'
});
function ViewModel() {
this.name = ko.observable("").extend({
required: true
});
};
ko.applyBindings(new ViewModel());
在最新版本上,请使用decorateInputElement
而不是decorateElement
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.