Yes, it is possible to use validation without a table. Simply define
$useTable = false in your model and define the validation rules as if
there was a table. You can then use cakes form helper without any
problems.
This is how you can force validation in your controller (part of my
contact page):
if (!empty($this->data)) {
$this->Contact->set($this->data);
if($this->Contact->validates()) {
//do something
}
} else {
$errors = $this->Contact->invalidFields();
$this->render();
}
Hope that helps,
Markus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---