CakePHP – Disable validation in controler

When upgrading an old web application to start using CakePHP but the old systems was riddled with invalid data. When the creating the CRUD system I need a way of updating this invalid data.

The following line of code will disable the validation in the controller.

$this->Story->validate = array(); // Stop valadation on the story.

Source: Cakephp Save with a table where the primary key is not ‘id’

No Comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>