by Chris Pitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

O'Reilly logo

CHAPTER 16

images

Settings

In this chapter, we will be looking at how to better validate posted form data, by extending the Model class. This allows us to relegate a task typically involved with the data of our application to the model where data (or business logic) should dwell.

Goals

  • We need to extend our Model class to include methods of posted form data validation, and to apply this validation before allowing rows to be added, updated, or deleted.
  • We need to create the action and view for the settings page.

Validation

Getting validation right can be a tricky thing, particularly when the aim of MVC is to allow for good separation of concerns. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required