-
Book Overview & Buying
-
Table Of Contents
KnockoutJS by Example
By :
We developed a customer registration form in the previous chapter. While the registration form application demonstrated how to work with form fields, it is missing out on a basic requirement that is expected from most web forms—validation!
In this chapter, we will add validation to our customer registration form application. We will explore two different methods of validating the form data in our model: by using the Knockout extenders and Knockout validation plugin. The chapter will walk you through applying validation to the registration form using the Knockout validation plugin.
It is important to note that the validation we are talking about in this chapter happens at the client side or more specifically, in the browser. The data should also be validated at the server side, but there are some benefits of validating the data at the client side. The benefits are mostly to do with user experience and performance...
Change the font size
Change margin width
Change background colour