Thanks brian, now I can put my validation code at model.
On Aug 7, 6:26 pm, brian bally.z...@gmail.com wrote:
I'm not sure that I understand your question. But you can call the
model's function directly from the controller.
On Fri, Aug 7, 2009 at 4:42 PM,leafchildleafchild.b...@gmail.com
Thanks, brian. but can I associate with my validation macadamized
function?
so if set validation in Size model:
=
...
'size_name' = array(
'namechk'=array(
I'm not sure that I understand your question. But you can call the
model's function directly from the controller.
On Fri, Aug 7, 2009 at 4:42 PM, leafchildleafchild.b...@gmail.com wrote:
Thanks, brian. but can I associate with my validation macadamized
function?
so if set validation in Size
Create some method in the Size model and pass the category_id to it:
if ($this-Product-Size-yourMethod($category_id))
On Mon, Aug 3, 2009 at 3:45 PM, leafchildleafchild.b...@gmail.com wrote:
thanks brian.
Is possible to pass specific value to validation at model(Size model
in this case)
thanks brian.
Is possible to pass specific value to validation at model(Size model
in this case)
I want to create custom validation but I need to pass value to do it.
(in this case, category_id)
thanks,
leafchild
On Aug 2, 8:49 am, brian bally.z...@gmail.com wrote:
Try this:
Try this:
$this-Product-Size-set($this-data);
if ($this-Product-Size-validates())
{
...
On Fri, Jul 31, 2009 at 3:12 PM, leafchildleafchild.b...@gmail.com wrote:
For example
There are 3 tables categories, products and sizes, and I'm
working on product page (product.php,
For example
There are 3 tables categories, products and sizes, and I'm
working on product page (product.php, products_controller.php,
product.ctp).
The database looks like this.
sizes:
---
|id |
---
| category_id |
| size_name|