0

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?

Cœur
  • 37,241
  • 25
  • 195
  • 267
RussGove
  • 322
  • 5
  • 18

1 Answers1

0

the following seems to set the validation message:

ko.validation.rules.pattern.message = 'customized validation message!';
Olav Nybø
  • 11,454
  • 8
  • 42
  • 34