how to validate form data

2010-08-04 Thread xiaopang
Hello,

If I want to validate the form input, let's see if it is a email and I
don't need to store this input in to database, which means the
$validate array can't do the validation.

In this case, besides writing reg express, does cakephp provide any
validation mechanism?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


How to add global variable

2010-07-20 Thread xiaopang
Hello:

I am a newby to Cakephp,

I have some simple data which I don't want to store in database but I
want them to be application wide accessible. for view, controller as
well as model.

For example:  I have a array  $admin_type, which define 2 types of
system administer,

$admin_type =  array (1 = 'King',
  2 = 'Admin');

Then, where should I define this variable?   I tried to define in
bootstrap file, but it doesn't work


Thanks in advance

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en