I have a model in CakePHP that does not have a table called Upload. I have a check in this model for a field named source_id.
I have a form that creates beautiful $ this data, giving me a well-formed set, including:
$this->data['Upload']['source_id']
However, the validation rule that I set does not seem to work at all. I copied this validation rule from another model where it works, so I'm sure it works:
var $validate = array(
'source_id' => array(
rule' => 'numeric',
'required' => true,
'allowEmpty' => false,
'message' => 'Error!.'
)
);
Is it possible to check the fields for a model that does not have a database table?
The form uses a load model and passes a different controller action method.
CakePHP 1.2, PHP / MySQL 5, XAMPP.
source
share