Let's say I have:
self.UserName = ko.observable("").extend({ required: true }).extend({ pattern: '[\S]' });
I am trying to do something like (I tried several options):
self.UserName = ko.observable("").extend({ required: true }).extend({ pattern: '[\S]', message : 'cannot contain spaces' });
But no luck.
I see that check bindings mention check messages, but it seems to be for a single message for the whole check.
And the custom validation rules seem more murdered, since all I need is a template, but with a different message.
Am I missing something obvious?
Alex KeySmith
source share