I am using knockout validation plugin to validate a simple form field , validation is working but it is showing same error message twice below text box.
my code follows
JS viewmodel
$(document).ready(function () {
ko.validation.registerExtenders();
ko.validation.configure({
registerExtenders: true,
messagesOnModified: false,
insertMessages: false,
parseInputAttributes: true,
messageTemplate: null
});
ko.validation.init();
var vm = new viewmodel();
ko.applyBindings(vm, document.getElementById("div"));
});
that.formField= ko.observable(vm.formField).extend({ required: true, minLength: 5, maxLength: 50 });
**html**
<p>
<label class="field-label">Who provides your service?</label>
<input name="txtService" id="txtInsservice" data-bind="value: formField, valueUpdate: 'keyup'" class="field-stretch" type="text" maxlength="50" />
</p>
Anything wrong with this?