Search code examples
knockout.jsknockout-validation

Knockout display all errors in one place


I just started to use the knockout validation plugin and I managed and I did manage to set up validation and from what I see the default behavior is to display for each validated property the errorMessage on it's right.

What I would like to be able to do is display all the messages in a central locations. is there any way to achieve this?


Solution

  • This answer is pretty complete and offers you a fiddle

    You have to use the validationMessage binding where you want to display your text.

    <p data-bind="validationMessage: newItem"></p>