# |
Aug 7th 2008, 23:56 |
infantigniter |
jonah: not sure, but you can always do 'ruleName'=>array('rule'=>'some other rule', 'allowEmpty'=>false) |
# |
Aug 7th 2008, 23:50 |
Jonah |
is 'rule' => VALID_NOT_EMPTY depreciated? |
# |
Aug 7th 2008, 23:44 |
jerrylee |
anthony: i will try your code |
# |
Aug 7th 2008, 23:42 |
jerrylee |
anthony: ah, maybe you teach me something |
# |
Aug 7th 2008, 23:42 |
infantigniter |
(and i can't cheat by adding my own quotes; query is smart and delimits them.) |
# |
Aug 7th 2008, 23:42 |
infantigniter |
anybody have any idea why query() won't put quotes around my varchar field for a condition |
# |
Aug 7th 2008, 23:41 |
anthony |
it's contain |
# |
Aug 7th 2008, 23:41 |
anthony |
is it contain or contains? |
# |
Aug 7th 2008, 23:40 |
anthony |
i think that's right |
# |
Aug 7th 2008, 23:40 |
anthony |
$this->Course->find("all", array("contain" => array("Attendant" => array("User")), "recursive" => 2)); |
# |
Aug 7th 2008, 23:39 |
anthony |
always worked like a charm |
# |
Aug 7th 2008, 23:39 |
anthony |
i've done it with 2 and 3 |
# |
Aug 7th 2008, 23:39 |
jerrylee |
anthony: in your case it works? |
# |
Aug 7th 2008, 23:37 |
jerrylee |
anthony: yes |
# |
Aug 7th 2008, 23:36 |
anthony |
is attendant associated with course? |
# |
Aug 7th 2008, 23:36 |
jerrylee |
but if i dont set contain, it will give 2 level, including user |
# |
Aug 7th 2008, 23:36 |
jerrylee |
anthony: really? i had a model course, and contain attendant, attendant belongs to user, if i use recursive=2, and read course, it only gives 1 level |
# |
Aug 7th 2008, 23:34 |
Jonah |
why is required put in the 'alphanumeric' rule? how could i give a custom error message when the field was not passed through $this-date? |
# |
Aug 7th 2008, 23:34 |
Jonah |
how come in this example from the book: http://bin.cakephp.org/view/1675849169 |
# |
Aug 7th 2008, 23:32 |
Jonah |
it does not seem logical though |
# |
Aug 7th 2008, 23:32 |
Jonah |
i think i got it not |
# |
Aug 7th 2008, 23:32 |
anthony |
jerrylee: it works with recursive=2, how is it not working? |
# |
Aug 7th 2008, 23:24 |
jerrylee |
hi i am using containable behavior in 1.2rc2, but i found if use it, recursive=2 will not working, is that correct? |
# |
Aug 7th 2008, 23:23 |
markstory |
Jonah: http://book.cakephp.org/view/125/data-validation |
# |
Aug 7th 2008, 23:21 |
markstory |
Jonah: well I've been wrong before. |
# |
Aug 7th 2008, 23:21 |
Jonah |
is there any other way to do it without putting 'required' in the 'length' rule? |
# |
Aug 7th 2008, 23:20 |
Jonah |
look at the position of required |
# |
Aug 7th 2008, 23:20 |
Jonah |
hmmm... http://bin.cakephp.org/view/2079057981 |
# |
Aug 7th 2008, 23:19 |
Jezek1 |
http://edwardawebb.com/programming/php-programming/cakephp/generating-dynamic-sitemaps-cakephp/ |
# |
Aug 7th 2008, 23:16 |
freebox |
ahm |
# |
Aug 7th 2008, 23:15 |
markstory |
if you want to see how model processes it look at line 2180 |
# |
Aug 7th 2008, 23:15 |
markstory |
required just makes sure that the key exists. |
# |
Aug 7th 2008, 23:15 |
Jonah |
whats the diff? |
# |
Aug 7th 2008, 23:14 |
markstory |
set allowEmpty = false as well. |
# |
Aug 7th 2008, 23:14 |
Jonah |
markstory: it does not work that way either |
# |
Aug 7th 2008, 23:14 |
markstory |
Jonah: no need to make required into an array. |
# |
Aug 7th 2008, 23:13 |
markstory |
I'm using it on my site. |
# |
Aug 7th 2008, 23:13 |
Jezek1 |
mmm i'll look around |
# |
Aug 7th 2008, 23:12 |
markstory |
freebox: the tutorial? I found it on google. |
# |
Aug 7th 2008, 23:12 |
markstory |
no need to make an array. |
# |
Aug 7th 2008, 23:12 |
markstory |
Jonah: 'required' => true should suffice. |