O'Reilly logo

Zend Framework 1 to 2 Migration Guide by Bart McLeod

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

Data Validating and Filtering

Validating and filtering are often related to forms, but they can be used separately. To emphasize this and also just to keep the book well structured, I reserve this separate chapter for validation and filtering. Filtering and validating can be used against any form of data, regardless of whether forms are involved. In ZF1, validation was tied closely to forms, but you could use it separately, too, by using Zend_Filter_Input. This component has been replaced and improved by Zend\InputFilter\InputFilter. Also, the new input filter is now the single centralized way to filter and validate at all times.

Filtering and Validating Our Data

Suppose that we want to simply validate a 'firstname' and 'lastname', without ...

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