# |
Aug 7th 2008, 21:20 |
infantigniter |
SamuraiDio: try 'rule'=>'' |
# |
Aug 7th 2008, 21:20 |
SamuraiDio |
infantigniter, but i don't want alphaNumeric, but anything, even special chars |
# |
Aug 7th 2008, 21:20 |
infantigniter |
SamuraiDio: try 'first_name'=>array('rule'=>'alphaNumeric', 'allowEmpty'=>false) |
# |
Aug 7th 2008, 21:19 |
SamuraiDio |
Warning (2): preg_match() [function.preg-match]: Empty regular expression [CORE/cake/libs/model/model.php, line 2202] |
# |
Aug 7th 2008, 21:19 |
SamuraiDio |
infantigniter, this is not working: 'first_name' => array('allowEmpty' => false) |
# |
Aug 7th 2008, 21:19 |
SamuraiDio |
freebox, don't do relationship in database, let cake take care of it. |
# |
Aug 7th 2008, 21:18 |
infantigniter |
SamuraiDio: as far as format goes they look fine |
# |
Aug 7th 2008, 21:11 |
SamuraiDio |
i'm not asking if they will work, just if i'm using cakePHP guidelines. i got a bit confused with the validation rules of cakePHP 1.2 |
# |
Aug 7th 2008, 21:09 |
Jonah |
heya foos |
# |
Aug 7th 2008, 21:09 |
zeeneo |
best to test them yourself :) |
# |
Aug 7th 2008, 21:08 |
SamuraiDio |
are these validations tules ok? http://pastebin.com/f3bfc3d83 |
# |
Aug 7th 2008, 21:08 |
freebox |
/ |
# |
Aug 7th 2008, 21:08 |
freebox |
if i do a relationship with these tables the id for category go away |
# |
Aug 7th 2008, 21:07 |
zeeneo |
i just use phpmyadmin or command line |
# |
Aug 7th 2008, 21:07 |
freebox |
i have id in product table and id in category table |
# |
Aug 7th 2008, 21:07 |
freebox |
i'm using db designer but its sucks beacause cake conventions |
# |
Aug 7th 2008, 21:06 |
freebox |
what u guys are using to modeling the db? |
# |
Aug 7th 2008, 21:05 |
infantigniter |
SamuraiDio: np |
# |
Aug 7th 2008, 21:05 |
infantigniter |
SamuraiDio: put that in an array with a rule |
# |
Aug 7th 2008, 21:05 |
SamuraiDio |
infantigniter, thanks |
# |
Aug 7th 2008, 21:04 |
lqdice__ |
Found this that seems to work even w/o taking the security setting to medium.. i wonder if it will work for all clients though.. http://blogs.bigfish.tv/adam/2008/04/01/cakephp-12-sessions-and-swfupload/ |
# |
Aug 7th 2008, 21:04 |
infantigniter |
SamuraiDio: 'allowEmpty'=>false |
# |
Aug 7th 2008, 21:03 |
markstory |
check $this->params['form'] |
# |
Aug 7th 2008, 21:02 |
SamuraiDio |
i was using this until now: 'first_name' => VALID_NOT_EMPTY, |
# |
Aug 7th 2008, 21:02 |
markstory |
if its not in model[field] form. |
# |
Aug 7th 2008, 21:02 |
zeeneo |
just debug($this->data); |
# |
Aug 7th 2008, 21:02 |
SamuraiDio |
how do i validade a field just to do not be empty, with the new validation rules? |
# |
Aug 7th 2008, 21:02 |
zeeneo |
$this->data['params']['url'] i think |
# |
Aug 7th 2008, 21:01 |
markstory |
$this->data |
# |
Aug 7th 2008, 21:01 |
infantigniter |
...string name |
# |
Aug 7th 2008, 21:01 |
infantigniter |
one other question, since i really can't think of what to search for... if i'm using prototype and it sends a POST like "average=3.5andidentity=demo_12andmax=5andrated=2andrerated=falseandtotal=2anduser_id=0andparentname=gamesandparentid=23andtime=14", basically the format is var=valueandvar=value... where can i access that data? is it assigned to $this->data? if so, does it parse the vars/values or is it some... |
# |
Aug 7th 2008, 21:00 |
lqdice__ |
markstory: yeah i might have to knock it down to medium security.. maybe i can do that just for 1 action |
# |
Aug 7th 2008, 21:00 |
markstory |
which is what you are trying to do. |
# |
Aug 7th 2008, 21:00 |
zeeneo |
i know |
# |
Aug 7th 2008, 21:00 |
markstory |
helps stop session hijacking. |
# |
Aug 7th 2008, 21:00 |
markstory |
compares a useragent string hash to that in the session. |
# |
Aug 7th 2008, 20:59 |
markstory |
lqdice__: it checks a bunch of stuff in the headers too. |
# |
Aug 7th 2008, 20:59 |
lqdice__ |
usually you can get by just by sending the session id |
# |
Aug 7th 2008, 20:59 |
markstory |
with someone else. perhaps not with cake but with other session authenticated processes. |
# |
Aug 7th 2008, 20:59 |
lqdice__ |
markstory: yeah but cake does some fancy session checking |
# |
Aug 7th 2008, 20:59 |
markstory |
lqdice__: check the swfupload docs? I'm sure this has happened before. |