3

I have a single page application developed using Knockout.js and Asp.Net MVC3. All seems to be working fine. However when we use traditional full postback model, we can annotate our model with attributes and it works out of the box.

But the problem when working with single page application is Asp.NET MVC has no way to output it's attributes which would make the client side validation magically work out of the box. Please note that I am not interested in writing that boiler plate code of checking each textbox's value and display error message.

Is there any consistent way to do client side validation?

Tim Tom
  • 2,152
  • 6
  • 27
  • 39
  • 2
    why exactly was this question downvoted without any feedback? – Shawn Mclean Jun 08 '12 at 04:13
  • @Shawn: I am also wondering. May be some inexperienced guy stumbled upon this thread and downvoted without any reason. I am wondering whether should I flag this for moderator attention. – Tim Tom Jun 08 '12 at 04:56
  • @jgauffin: I understand that. That's why I still haven't flagged. That guy just downvoted this question. If I would have been a victim of serial downvoting then I would have flagged it. – Tim Tom Jun 08 '12 at 06:58
  • @TimTom: No need for that either. SO got a bot which removes serial down voting (can take a day or two, but they do get removed). – jgauffin Jun 08 '12 at 07:02
  • 1
    Duplicate question: http://stackoverflow.com/questions/8996449/knockout-validation – Rob Kent Jun 08 '12 at 10:42

1 Answers1

1

I use Knockout-Validation.

Its great.

nacho10f
  • 5,816
  • 6
  • 42
  • 73