Re-using server side logic for client side validation

In this post, I will show an example how to re-use your server side validation code for client side validation. This is achieved by using Ajax call to the server side validation code.