Summary

In this chapter, we walked through adding validation to the customer registration form we built in the previous chapter. The chapter looked at two different techniques of applying validation. We first explored validating the model using custom extenders. We defined the required extender and learned how to apply error styles using the visible and css bindings. We applied validation to the first name field using our custom extender.

The second part of the chapter looked at applying validation to the model using the Knockout validation plugin. This part of the chapter walked you through the customer registration form and applied validation to the personal information, contact details, address, and credit card fields. We learned how to apply ...

Get KnockoutJS by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.