ASP.NET: Syncing client and server-side validation rules

Are there any easy, smart ways to keep your client and server-side validation-rules synchronized?

On the client side we have JavaScript, maybe some kind of framework like jQuery or YUI.

On the server-side we have ASP.NET WebForms or ASP.NET MVC.

What is validated are things like:

  • Correct e-mail-addresses
  • Correct home-addresses and postal codes
  • Correct credit-card numbers

And so on.


You can try using Enterprise Library Validation with ASP.NET integration.

<asp:RegularExpressionValidator ...> (and the other validators) implement client side javascript and server side checking to the same rules.

Need Your Help

IBM process server v8.5.5 - Caused by: java.lang.IllegalStateException: BO Service is not supported

java eclipse ibm websphere-process-server

I was trying to get the HelloServiceApp example working under the IBM Process Server v8.5.5 (Windows 7 - 64-bit).

Application crash with no exception after resuming

android android-service android-mediaplayer surfaceview

I am making simple app to display video and plaing audio playback if activity is in background.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.