0
votes

I'm using the HTML5 syntax of knockout-validation to validate that the user has entered a valid number like this:

<input type="text" data-bind="value: Lots" pattern="^\d*\.?\d*$" />

It works great, but the error message just says 'Invalid!'.
Is there a way to customize the validation message that appears when using the HTML% syntax?

1
Please have a look here: stackoverflow.com/a/10554179 - nekman

1 Answers

0
votes

the following seems to set the validation message:

ko.validation.rules.pattern.message = 'customized validation message!';