How to cover ALL your client-side form validation needs without writin(devermind.com)

submitted by pluggypluggy(284) 2 years, 11 months ago

Client-side form validation has become a de-facto standard for modern web applications. However, there are some validation rules which cannot be checked completely on the client side, for example because the validation depends on information stored in the server database. For those rules you need to implement remote client-side form validation. The xVal framework is great for automatic generation of client-side validation code for some of your server-side validation rules, but it does not support remote client-side validation. This article shows a fully generic way to implement remote client-side form validation so that • Validation rules remain solely in your ASP.NET MVC model • You write each validation rule just once, and only in easily testable C# code. There is no JavaScript or other client-side counterpart . • There is no need to branch or otherwise modify xVal or jquery.validate • All you have to do for each new remote form validation rule is to derive from the base class shown in this article. I'll describe how to implement this in detail. I've also uploaded a demo project showing how this works in action.

add a comment |category: |Views: 11

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story