Skip to Main Content
Pro PHP MVC
book

Pro PHP MVC

by Chris Pitt
October 2012
Beginner to intermediate content levelBeginner to intermediate
500 pages
10h 29m
English
Apress
Content preview from Pro PHP MVC

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. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro PHP Programming

Pro PHP Programming

Peter MacIntyre, Brian Danchilla, Mladen Gogala
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff

Publisher Resources

ISBN: 9781430241645Purchase book