Table's save() fails, where to get the error message? (other than validation errors)

2015-09-14 Thread Ernesto Borio
I can't find in the documentation how to collect error messages (other than 
validation errors) for when a table's save() or delete() fail, how is it 
done?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
Glad it worked :)

On Wednesday, July 30, 2014 3:35:21 PM UTC+2, Jipson Thomas wrote:
>
> Hi Jose Lorenzo,
> Thank you very much. Now it is working perfectly.
> Regards,
> Jipson
>
> On Wednesday, 30 July 2014 14:31:30 UTC+1, José Lorenzo wrote:
>>
>> Ok, you problem is that you are calling create() without the entity, You 
>> should get that fixed by doing:
>>
>> Form->create($package) ?>
>>
>> On Wednesday, July 30, 2014 3:29:33 PM UTC+2, Jipson Thomas wrote:
>>>
>>> Hi Jose Lorenzo,
>>> Thank you for the reply. Please find the below code 
>>>
>>> *CTP*
>>> ==
>>> 
>>> Flash->render('auth') ?>
>>> Form->create() ?>
>>> 
>>> >> ?>
>>>Form->input('name', ['label' => 'Package 
>>> Name']); ?>
>>>Form->input('annual_price', ['label' => 'Price 
>>> / Year','type' => 'decimal']); ?>
>>>Form->input('monthly_price', ['label' => 'Price 
>>> / Month','type' => 'decimal']); ?>
>>>Form->input('duration', ['label' => 'Minimum 
>>> Months of Contract','type' => 'integer']);?>
>>>Form->input('no_partners', ['label' => 'Maximum 
>>> No of Partners','type' => 'integer']);?>
>>>Form->input('no_emails', ['label' => 'Maximum 
>>> No of Emails/Month','type' => 'integer']);?>
>>>Form->input('storage', ['label' => 'Maximum 
>>> Allowed Storage Space (GB)','type' => 'integer']);?>
>>>Form->input('resource_library', ['label' => 
>>> 'Resource Library','type' => 'checkbox','value' => 'Y','hiddenField' => 
>>> 'N']);?> 
>>>Form->input('portal_cms', ['label' => 'Portal 
>>> CMS','type' => 'checkbox','value'=>'Y','hiddenField' => 'N']);?>
>>>Form->input('MDF', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>>Form->input('deal_registration', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>>Form->input('partner_recruit', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>>Form->input('training', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>>Form->input('Socialmedia', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>>Form->input('multilingual', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>>Form->input('partner_incentive', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>>Form->input('partner_app', ['type' => 
>>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>>
>>> 
>>> Form->button(__('Save')); ?>
>>> Form->end() ?>
>>> 
>>>
>>> *Controller Action*
>>> ==
>>> public function add(){
>>> $package = $this->Package->newEntity($this->request->data);
>>> if ($this->request->is('post')) {
>>> if ($this->Package->save($package)) {
>>> $this->Flash->success(__('The package has been saved.'));
>>> return $this->redirect(['action' => 'index']);
>>> }
>>> else{
>>>   //  $errors = $this->Package->errors();
>>> 
>>> $error_string=  implode('\n',$package->errors());
>>> //print_r($package);
>>> }
>>> $this->Flash->error(__('Unable to add the package.'));
>>> }
>>> $this->set('package', $package);
>>> }
>>>
>>> *Model - Table Class*
>>> =
>>> class PackagesTable extends Table {
>>> public function initialize(array $config) {
>>> $this->addBehavior('Timestamp', [
>>> 'events' => [
>>> 'Model.beforeSave' => [
>>> 'created_on' => 'new',
>>> 'modified_on' => 'always',
>>> ]
>>> 
>>> ]
>>> ]);
>>> }
>>> public function validationDefault(Validator $validator) {
>>> $validator
>>> ->notEmpty('name','A valid package name is required')
>>> ->notEmpty('annual_price','A valid annual price is required')
>>> ->notEmpty('monthly_price','A valid monthly price is 
>>> required')
>>> ->notEmpty('duration','Minimum duration of contract is 
>>> required')
>>> ->notEmpty('no_partners','Maximum no of partners is 
>>> required')
>>> ->notEmpty('no_emails','Maximum no of emails per month is 
>>> required');
>>>
>>> return $validator;
>>> }
>>> }
>>>
>>> Regards,
>>> Jipson
>>>
>>> On Wednesday, 30 July 2014 14:20:54 UTC+1, Jipson Thomas wrote:

 Hi ,
 On my package creation form I am using cakephp validation. The 
 validation is working perfectly. Unfortunately the validation error 
 messages are not displaying on my form. Would you please help me on this?

 The code I am using is as follows. Please advise me what I am missing 
 here.

 *My Table Class*
 ==
 public function validationDefault(Validator $validator) {
 $validator

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi Jose Lorenzo,
Thank you very much. Now it is working perfectly.
Regards,
Jipson

On Wednesday, 30 July 2014 14:31:30 UTC+1, José Lorenzo wrote:
>
> Ok, you problem is that you are calling create() without the entity, You 
> should get that fixed by doing:
>
> Form->create($package) ?>
>
> On Wednesday, July 30, 2014 3:29:33 PM UTC+2, Jipson Thomas wrote:
>>
>> Hi Jose Lorenzo,
>> Thank you for the reply. Please find the below code 
>>
>> *CTP*
>> ==
>> 
>> Flash->render('auth') ?>
>> Form->create() ?>
>> 
>> > ?>
>>Form->input('name', ['label' => 'Package 
>> Name']); ?>
>>Form->input('annual_price', ['label' => 'Price / 
>> Year','type' => 'decimal']); ?>
>>Form->input('monthly_price', ['label' => 'Price 
>> / Month','type' => 'decimal']); ?>
>>Form->input('duration', ['label' => 'Minimum 
>> Months of Contract','type' => 'integer']);?>
>>Form->input('no_partners', ['label' => 'Maximum 
>> No of Partners','type' => 'integer']);?>
>>Form->input('no_emails', ['label' => 'Maximum No 
>> of Emails/Month','type' => 'integer']);?>
>>Form->input('storage', ['label' => 'Maximum 
>> Allowed Storage Space (GB)','type' => 'integer']);?>
>>Form->input('resource_library', ['label' => 
>> 'Resource Library','type' => 'checkbox','value' => 'Y','hiddenField' => 
>> 'N']);?> 
>>Form->input('portal_cms', ['label' => 'Portal 
>> CMS','type' => 'checkbox','value'=>'Y','hiddenField' => 'N']);?>
>>Form->input('MDF', ['type' => 'checkbox','value' 
>> => 'Y','hiddenField' => 'N']);?>
>>Form->input('deal_registration', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>Form->input('partner_recruit', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>Form->input('training', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>Form->input('Socialmedia', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>>Form->input('multilingual', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>Form->input('partner_incentive', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>Form->input('partner_app', ['type' => 
>> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>>
>> 
>> Form->button(__('Save')); ?>
>> Form->end() ?>
>> 
>>
>> *Controller Action*
>> ==
>> public function add(){
>> $package = $this->Package->newEntity($this->request->data);
>> if ($this->request->is('post')) {
>> if ($this->Package->save($package)) {
>> $this->Flash->success(__('The package has been saved.'));
>> return $this->redirect(['action' => 'index']);
>> }
>> else{
>>   //  $errors = $this->Package->errors();
>> 
>> $error_string=  implode('\n',$package->errors());
>> //print_r($package);
>> }
>> $this->Flash->error(__('Unable to add the package.'));
>> }
>> $this->set('package', $package);
>> }
>>
>> *Model - Table Class*
>> =
>> class PackagesTable extends Table {
>> public function initialize(array $config) {
>> $this->addBehavior('Timestamp', [
>> 'events' => [
>> 'Model.beforeSave' => [
>> 'created_on' => 'new',
>> 'modified_on' => 'always',
>> ]
>> 
>> ]
>> ]);
>> }
>> public function validationDefault(Validator $validator) {
>> $validator
>> ->notEmpty('name','A valid package name is required')
>> ->notEmpty('annual_price','A valid annual price is required')
>> ->notEmpty('monthly_price','A valid monthly price is 
>> required')
>> ->notEmpty('duration','Minimum duration of contract is 
>> required')
>> ->notEmpty('no_partners','Maximum no of partners is required')
>> ->notEmpty('no_emails','Maximum no of emails per month is 
>> required');
>>
>> return $validator;
>> }
>> }
>>
>> Regards,
>> Jipson
>>
>> On Wednesday, 30 July 2014 14:20:54 UTC+1, Jipson Thomas wrote:
>>>
>>> Hi ,
>>> On my package creation form I am using cakephp validation. The 
>>> validation is working perfectly. Unfortunately the validation error 
>>> messages are not displaying on my form. Would you please help me on this?
>>>
>>> The code I am using is as follows. Please advise me what I am missing 
>>> here.
>>>
>>> *My Table Class*
>>> ==
>>> public function validationDefault(Validator $validator) {
>>> $validator
>>> ->notEmpty('name','A valid package name is required')
>>> ->notEmpty('annual_price','A valid annual price is required')
>>> ->notEmpty('monthly_price','A valid monthly price is 
>>> required')
>>>   

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
Ok, you problem is that you are calling create() without the entity, You 
should get that fixed by doing:

Form->create($package) ?>

On Wednesday, July 30, 2014 3:29:33 PM UTC+2, Jipson Thomas wrote:
>
> Hi Jose Lorenzo,
> Thank you for the reply. Please find the below code 
>
> *CTP*
> ==
> 
> Flash->render('auth') ?>
> Form->create() ?>
> 
>  ?>
>Form->input('name', ['label' => 'Package Name']); 
> ?>
>Form->input('annual_price', ['label' => 'Price / 
> Year','type' => 'decimal']); ?>
>Form->input('monthly_price', ['label' => 'Price / 
> Month','type' => 'decimal']); ?>
>Form->input('duration', ['label' => 'Minimum 
> Months of Contract','type' => 'integer']);?>
>Form->input('no_partners', ['label' => 'Maximum 
> No of Partners','type' => 'integer']);?>
>Form->input('no_emails', ['label' => 'Maximum No 
> of Emails/Month','type' => 'integer']);?>
>Form->input('storage', ['label' => 'Maximum 
> Allowed Storage Space (GB)','type' => 'integer']);?>
>Form->input('resource_library', ['label' => 
> 'Resource Library','type' => 'checkbox','value' => 'Y','hiddenField' => 
> 'N']);?> 
>Form->input('portal_cms', ['label' => 'Portal 
> CMS','type' => 'checkbox','value'=>'Y','hiddenField' => 'N']);?>
>Form->input('MDF', ['type' => 'checkbox','value' 
> => 'Y','hiddenField' => 'N']);?>
>Form->input('deal_registration', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>Form->input('partner_recruit', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>Form->input('training', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>Form->input('Socialmedia', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
>Form->input('multilingual', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>Form->input('partner_incentive', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>Form->input('partner_app', ['type' => 
> 'checkbox','value' => 'Y','hiddenField' => 'N']);?>
>
> 
> Form->button(__('Save')); ?>
> Form->end() ?>
> 
>
> *Controller Action*
> ==
> public function add(){
> $package = $this->Package->newEntity($this->request->data);
> if ($this->request->is('post')) {
> if ($this->Package->save($package)) {
> $this->Flash->success(__('The package has been saved.'));
> return $this->redirect(['action' => 'index']);
> }
> else{
>   //  $errors = $this->Package->errors();
> 
> $error_string=  implode('\n',$package->errors());
> //print_r($package);
> }
> $this->Flash->error(__('Unable to add the package.'));
> }
> $this->set('package', $package);
> }
>
> *Model - Table Class*
> =
> class PackagesTable extends Table {
> public function initialize(array $config) {
> $this->addBehavior('Timestamp', [
> 'events' => [
> 'Model.beforeSave' => [
> 'created_on' => 'new',
> 'modified_on' => 'always',
> ]
> 
> ]
> ]);
> }
> public function validationDefault(Validator $validator) {
> $validator
> ->notEmpty('name','A valid package name is required')
> ->notEmpty('annual_price','A valid annual price is required')
> ->notEmpty('monthly_price','A valid monthly price is required')
> ->notEmpty('duration','Minimum duration of contract is 
> required')
> ->notEmpty('no_partners','Maximum no of partners is required')
> ->notEmpty('no_emails','Maximum no of emails per month is 
> required');
>
> return $validator;
> }
> }
>
> Regards,
> Jipson
>
> On Wednesday, 30 July 2014 14:20:54 UTC+1, Jipson Thomas wrote:
>>
>> Hi ,
>> On my package creation form I am using cakephp validation. The validation 
>> is working perfectly. Unfortunately the validation error messages are not 
>> displaying on my form. Would you please help me on this?
>>
>> The code I am using is as follows. Please advise me what I am missing 
>> here.
>>
>> *My Table Class*
>> ==
>> public function validationDefault(Validator $validator) {
>> $validator
>> ->notEmpty('name','A valid package name is required')
>> ->notEmpty('annual_price','A valid annual price is required')
>> ->notEmpty('monthly_price','A valid monthly price is 
>> required')
>> ->notEmpty('duration','Minimum duration of contract is 
>> required')
>> ->notEmpty('no_partners','Maximum no of partners is required')
>> ->notEmpty('no_emails','Maximum no of emails per month is 
>> required');
>>
>> return $validator;
>> }
>>

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi Jose Lorenzo,
Thank you for the reply. Please find the below code 

*CTP*
==

Flash->render('auth') ?>
Form->create() ?>


   Form->input('name', ['label' => 'Package Name']); 
?>
   Form->input('annual_price', ['label' => 'Price / 
Year','type' => 'decimal']); ?>
   Form->input('monthly_price', ['label' => 'Price / 
Month','type' => 'decimal']); ?>
   Form->input('duration', ['label' => 'Minimum 
Months of Contract','type' => 'integer']);?>
   Form->input('no_partners', ['label' => 'Maximum No 
of Partners','type' => 'integer']);?>
   Form->input('no_emails', ['label' => 'Maximum No 
of Emails/Month','type' => 'integer']);?>
   Form->input('storage', ['label' => 'Maximum 
Allowed Storage Space (GB)','type' => 'integer']);?>
   Form->input('resource_library', ['label' => 
'Resource Library','type' => 'checkbox','value' => 'Y','hiddenField' => 
'N']);?> 
   Form->input('portal_cms', ['label' => 'Portal 
CMS','type' => 'checkbox','value'=>'Y','hiddenField' => 'N']);?>
   Form->input('MDF', ['type' => 'checkbox','value' 
=> 'Y','hiddenField' => 'N']);?>
   Form->input('deal_registration', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
   Form->input('partner_recruit', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
   Form->input('training', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?>
   Form->input('Socialmedia', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?> 
   Form->input('multilingual', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?>
   Form->input('partner_incentive', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?>
   Form->input('partner_app', ['type' => 
'checkbox','value' => 'Y','hiddenField' => 'N']);?>
   

Form->button(__('Save')); ?>
Form->end() ?>


*Controller Action*
==
public function add(){
$package = $this->Package->newEntity($this->request->data);
if ($this->request->is('post')) {
if ($this->Package->save($package)) {
$this->Flash->success(__('The package has been saved.'));
return $this->redirect(['action' => 'index']);
}
else{
  //  $errors = $this->Package->errors();

$error_string=  implode('\n',$package->errors());
//print_r($package);
}
$this->Flash->error(__('Unable to add the package.'));
}
$this->set('package', $package);
}

*Model - Table Class*
=
class PackagesTable extends Table {
public function initialize(array $config) {
$this->addBehavior('Timestamp', [
'events' => [
'Model.beforeSave' => [
'created_on' => 'new',
'modified_on' => 'always',
]

]
]);
}
public function validationDefault(Validator $validator) {
$validator
->notEmpty('name','A valid package name is required')
->notEmpty('annual_price','A valid annual price is required')
->notEmpty('monthly_price','A valid monthly price is required')
->notEmpty('duration','Minimum duration of contract is 
required')
->notEmpty('no_partners','Maximum no of partners is required')
->notEmpty('no_emails','Maximum no of emails per month is 
required');

return $validator;
}
}

Regards,
Jipson

On Wednesday, 30 July 2014 14:20:54 UTC+1, Jipson Thomas wrote:
>
> Hi ,
> On my package creation form I am using cakephp validation. The validation 
> is working perfectly. Unfortunately the validation error messages are not 
> displaying on my form. Would you please help me on this?
>
> The code I am using is as follows. Please advise me what I am missing here.
>
> *My Table Class*
> ==
> public function validationDefault(Validator $validator) {
> $validator
> ->notEmpty('name','A valid package name is required')
> ->notEmpty('annual_price','A valid annual price is required')
> ->notEmpty('monthly_price','A valid monthly price is required')
> ->notEmpty('duration','Minimum duration of contract is 
> required')
> ->notEmpty('no_partners','Maximum no of partners is required')
> ->notEmpty('no_emails','Maximum no of emails per month is 
> required');
>
> return $validator;
> }
>
> *On my controller*
> 
> I am using the following codes to get the validation result.
> $package = $this->Package->newEntity($this->request->data);
> if ($this->SubscriptionPackage->save($package)) {
> $this->Flash->success(__('The package has been saved.'));
> return $this->redirect(['action' => 'index']);
> }
> else{
> //print_r($package->errors()); It will disp

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
There does not seem to be any Form->create() call in that code you pasted. 
Can you share the full code?

On Wednesday, July 30, 2014 3:20:54 PM UTC+2, Jipson Thomas wrote:
>
> Hi ,
> On my package creation form I am using cakephp validation. The validation 
> is working perfectly. Unfortunately the validation error messages are not 
> displaying on my form. Would you please help me on this?
>
> The code I am using is as follows. Please advise me what I am missing here.
>
> *My Table Class*
> ==
> public function validationDefault(Validator $validator) {
> $validator
> ->notEmpty('name','A valid package name is required')
> ->notEmpty('annual_price','A valid annual price is required')
> ->notEmpty('monthly_price','A valid monthly price is required')
> ->notEmpty('duration','Minimum duration of contract is 
> required')
> ->notEmpty('no_partners','Maximum no of partners is required')
> ->notEmpty('no_emails','Maximum no of emails per month is 
> required');
>
> return $validator;
> }
>
> *On my controller*
> 
> I am using the following codes to get the validation result.
> $package = $this->Package->newEntity($this->request->data);
> if ($this->SubscriptionPackage->save($package)) {
> $this->Flash->success(__('The package has been saved.'));
> return $this->redirect(['action' => 'index']);
> }
> else{
> //print_r($package->errors()); It will display an array with field names 
> and message.
> }
>
> *On my ctp file I am using the following code.*
> 
>  Form->input('name', ['label' => 'Package Name']); ?>
>Form->input('annual_price', ['label' => 'Price / 
> Year','type' => 'decimal']); ?>
>Form->input('monthly_price', ['label' => 'Price / 
> Month','type' => 'decimal']); ?>
>Form->input('duration', ['label' => 'Minimum 
> Months of Contract','type' => 'integer']);?>
>Form->input('no_partners', ['label' => 'Maximum 
> No of Partners','type' => 'integer']);?>
>Form->input('no_emails', ['label' => 'Maximum No 
> of Emails/Month','type' => 'integer']);?>
>Form->input('storage', ['label' => 'Maximum 
> Allowed Storage Space (GB)','type' =>?>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi ,
On my package creation form I am using cakephp validation. The validation 
is working perfectly. Unfortunately the validation error messages are not 
displaying on my form. Would you please help me on this?

The code I am using is as follows. Please advise me what I am missing here.

*My Table Class*
==
public function validationDefault(Validator $validator) {
$validator
->notEmpty('name','A valid package name is required')
->notEmpty('annual_price','A valid annual price is required')
->notEmpty('monthly_price','A valid monthly price is required')
->notEmpty('duration','Minimum duration of contract is 
required')
->notEmpty('no_partners','Maximum no of partners is required')
->notEmpty('no_emails','Maximum no of emails per month is 
required');

return $validator;
}

*On my controller*

I am using the following codes to get the validation result.
$package = $this->Package->newEntity($this->request->data);
if ($this->SubscriptionPackage->save($package)) {
$this->Flash->success(__('The package has been saved.'));
return $this->redirect(['action' => 'index']);
}
else{
//print_r($package->errors()); It will display an array with field names 
and message.
}

*On my ctp file I am using the following code.*

 Form->input('name', ['label' => 'Package Name']); ?>
   Form->input('annual_price', ['label' => 'Price / 
Year','type' => 'decimal']); ?>
   Form->input('monthly_price', ['label' => 'Price / 
Month','type' => 'decimal']); ?>
   Form->input('duration', ['label' => 'Minimum 
Months of Contract','type' => 'integer']);?>
   Form->input('no_partners', ['label' => 'Maximum No 
of Partners','type' => 'integer']);?>
   Form->input('no_emails', ['label' => 'Maximum No 
of Emails/Month','type' => 'integer']);?>
   Form->input('storage', ['label' => 'Maximum 
Allowed Storage Space (GB)','type' =>?>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


FormHelper does not show validation errors

2014-02-24 Thread wilderland


Hi

I'm not sure if someone has this problem, but I need your help and maybe a 
push in the right direction.

I have a record, with a list of assoziated records, like you have, when you 
bind a model with hasMany, an example I attached to this post. 

With the FormHelper I create the required inputs for the assoziated records 
like this:

echo 
"\n".$this->Form->input(ProfilesCountry.1.ProfilesCountry.country_int_id', 
array());
echo "\n".$this->Form->hidden(ProfilesCountry.1.ProfilesCountry.id');

All data is placed and posted fine.

BUT the Problem is, when I have a validation-error the FormHelper looks in 
the Model for " ProfilesCountry.1.country_int_id " so the error is not 
displayed. 

Is there a way to help the FormHelper to find the right error, so that it 
will be shown? Or is a way to add a errormessage manually to the input, so 
that the FormHelper can work?

Thanks

Wilderland


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
Array
(
[Profile] => Array
(
[id] => 10
[name] => Schmidt100
[firstname] => Maria
[gender] => F
[birthday] => 1993-08-08
[created] => 2013-08-08 17:16:05
[modified] => 2013-08-08 17:16:05
)


[ProfilesCountry] => Array
(
[0] => Array
(
[ProfilesCountry] => Array
(
[id] => 1
[profile_id] => 10
[country_int_id] => 241
[sort_order] => 0
[created] => 2013-08-13 20:25:34
[modified] => 2013-08-13 20:25:35
)

[CountryInt] => Array
(
[id] => 241
[active] => 1
[sort_order] => 0
[name] => United States
)

)

[1] => Array
(
[ProfilesCountry] => Array
(
[id] => 2
[profile_id] => 10
[country_int_id] => 48
[sort_order] => 0
[created] => 2013-08-13 20:26:16
[modified] => 2013-08-13 20:26:17
)

[CountryInt] => Array
(
[id] => 48
[active] => 1
[sort_order] => 0
[name] => Germany

)

)

)



)



Re: Not seeing validation errors with saveAll

2013-02-27 Thread Benjamin Allison
Anyone? Are specific validation errors for a bunch of records even possible?
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Not seeing validation errors with saveAll

2013-02-24 Thread Benjamin Allison
I have a list of User records that I'm saving at one time (the form is 
populated from an uploaded CSV).

Everything seems to be working fine, and my validation rules are being 
honoured, but one thing that's eluding me are the specific validation error 
messages.

I get the general validation error (if say, a field that is supposed to be 
unique is not), but I'm not getting an error on the specific field to let the 
user know what the actual problem is.

Is this a bug, or is there something wrong with my Code? Here's the action from 
my Controller (fwiw I'm passing the CSV data to this action from another 
action, hence the snippet at the beginning):

public function finalizeCsv() {
if ( isset($this->request->params['named']['csvData']) ) {
$csvData = unserialize( $this->request->params['named']['csvData'] );
} else {
$csvData = $this->request->data;
}
$this->set('users', $csvData);
if ($this->request->is('get')) {
$this->request->data = $csvData;
}
if ($this->request->is('post') || $this->request->is('put')) {
if ($this->User->saveAll($this->request->data['User'])) {
$this->Session->setFlash('Users added!', 'default', array('class' 
=> 'success'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash('There were errors with your data.');
}
}
}

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




How to pass HABTM validation errors to FormHelper?

2012-11-01 Thread Nvp
Hi!
I read many topics about HABTM validation in Cake but I can't figure out 
how to solve my problem.

I have my main model – Restaurants, it has many HABTM relations to 
additional models.
Now I'm building admin area, and I'm working with new controller in which I 
have

public $uses = array('Restaurant');

This admin area controller have an edit action: 
 
... else {
if ($this->Restaurant->save($this->request->data)) {
$this->Session->setFlash('Ok!');
$this->redirect(array('action' => 'edit', $id));
} else {
$this->Session->setFlash('Error');   
$this->redirect(array('action' => 'edit', $id));
}
}

In my Restaurant model I have:

function beforeValidate() {  
foreach($this->hasAndBelongsToMany as $k=>$v) {
if(isset($this->data[$k][$k]))
{
$this->data[$this->alias][$k] = $this->data[$k][$k];
}
 }
}
I can't comment this code because it's from HABTM validation guide.

And also in Restaurant model I have some validation rules:

var $validate = array(
'engcompanyname' => array(
'rule' => 'notEmpty',
'message' => 'Test message'
)
);

In edit.ctp I have standard form builded with FormHelper:

 Form->create(); 
...
echo $this->Form->input('engcompanyname', array('label' => 'Test 
label'));
...
echo $this->Form->end(array('label' => 'Save');
?>

The problem is that validation itself works very well, I got my session 
message back for success and error conditions, the data from the form 
correctly passes to database etc.  But FormHelper does not show any error 
messages.

CakePHP version is 2.2.2

Thanks in advance!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Validation errors not working properly

2012-05-14 Thread rahaji...@bankofbaku.com
Sorry, my bad, initially I changed all occurrences of the tutorial's
User to Admin, then I changed my mind and reverted back to User, but
missed this

echo $this->Form->create('Admin');

After changing to echo $this->Form->create('User'); everything works.

Don't do this at home :)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Validation errors not working properly

2012-05-14 Thread rahaji...@bankofbaku.com
This stuff is mostly taken from
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

Here's the model:

class User extends UserModel {
public $name = 'User';
public $validate = array(
'username' => array(
'rule1' => array(
'rule' => 'alphaNumeric',
'required' => true,
'allowEmpty' => false,
'message' => 'Username must be specified and
be alphanumeric'),
'rule2' => array(
'rule' => array('minLength', 4),
'message' => 'Username must have at least 4
characters')));

Here's the controller:
class UsersController extends AppController {
public function add() {
if ($this->request->isPost()) {
$this->User->create();
if ($this->User->save($this->request->data)) {
$this->Session->setFlash(__('The user has been
saved'));
$this->redirect(array('action' => 'index'));
} else {
$this->Session->setFlash(__('The user could not be
saved. Please, try again.'));
$this->set('errors', $this->User->validationErrors);
$this->set('data', $this->request->data);
}
}
}


Here's the view Users/add.ctp

element('form_errors', array('errors' => $errors)); ?
>
Form->create('Admin');?>


Form->input('username');
echo $this->Form->input('password');
echo $this->Form->input('role', array(
'options' => array('admin' => 'Admin', 'author' =>
'Author')
));
?>

Form->end(__('Submit'));?>


and here's View/Elements/form_errors.ctp:


'; var_dump($data); ?>

There are  error(s) in your
submission:


 $error) { ?>











Then I visit users/add in my browser. No matter what I enter, after
clicking submit I get:
The user could not be saved. Please, try again.
array(1) { ["username"]=> array(1) { [0]=> string(46) "Username must
be specified and be alphanumeric" } }
array(1) { ["Admin"]=> array(3) { ["username"]=> string(0)
"" ["password"]=> string(0) "" ["role"]=> string(5) "admin" } }
There are 1 error(s) in your submission:

Username must be specified and be alphanumeric


Did I do anything wrong? Please help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread KingInky
Hey, thank you! You were completely right. I'm feeling a little dumb right 
now :]

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread Tilen Majerle
i think, filename should be user.php not user_model.php :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/7/23 KingInky 

> I have had no luck figuring this out. Still seeking answers. Thank you all.
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread KingInky
I have had no luck figuring this out. Still seeking answers. Thank you all.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread KingInky
Sure.

The model (user_model.php): http://pastebin.com/RdaEfnCn
The controller (users_controller.php): http://pastebin.com/4pfbWZKE
The view (register.ctp): http://pastebin.com/aTjTya6z

Thanks again for your help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


RE: CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread Meroe Kush
Please pastebin your model, view, and controller.

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of KingInky
Sent: Friday, July 22, 2011 6:42 PM
To: CakePHP
Subject: CakePHP Form Validation Errors -- no luck???

Hello,

I'm a CakePHP amateur. I've converted a clients Wordpress into a
CakePHP website (or have been trying to, at least). I just started
doing his registration form. For whatever reason, it is NOT validating
any of the rules I've setup in my model. I've had people in the
CakePHP IRC look at and comment on my code, but no one sees anything
wrong. I don't know what's going on, because I've done simple
registration/login systems in CakePHP before with no problem
(normally, the errors display).

My latest theory is that possibly the errors are being passed (though
I honestly don't think they are), but not being displayed. I'd like to
try and print out (using pre()) the array that holds the validation
errors, but I have no idea where that is located.

Other than that, I'm open to further suggestions. Please help me,
because this is VERY time-sensitive.

Thank you all very much.
I will be checking regularly,
Ethan

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread KingInky
Hello,

I'm a CakePHP amateur. I've converted a clients Wordpress into a
CakePHP website (or have been trying to, at least). I just started
doing his registration form. For whatever reason, it is NOT validating
any of the rules I've setup in my model. I've had people in the
CakePHP IRC look at and comment on my code, but no one sees anything
wrong. I don't know what's going on, because I've done simple
registration/login systems in CakePHP before with no problem
(normally, the errors display).

My latest theory is that possibly the errors are being passed (though
I honestly don't think they are), but not being displayed. I'd like to
try and print out (using pre()) the array that holds the validation
errors, but I have no idea where that is located.

Other than that, I'm open to further suggestions. Please help me,
because this is VERY time-sensitive.

Thank you all very much.
I will be checking regularly,
Ethan

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Validation errors only working in Add form, but not in Edit form.

2011-04-18 Thread stas kim
a) use http://bin.cakephp.org or other bin of preference to show your code
b) Model::save() validation parameter defaults to true, no need to force it
c) number of reasons why you don't see messages
you may not print it in the view - compare your add and edit views
or your validation rules 'on' options set to 'create'


On Mon, Apr 18, 2011 at 1:57 PM, Krissy Masters
 wrote:
> if ($this->Post->save($this->data)) { you not forcing validation check
>
> add true
>
> if ($this->Post->save($this->data, true)) {
>
> K
>
> -Original Message-
> From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
> Of jackgoh
> Sent: Monday, April 18, 2011 3:23 PM
> To: CakePHP
> Subject: Validation errors only working in Add form, but not in Edit form.
>
> Hi,
>
>
> The validation message is working in Add Form, but not in the Edit
> Form, can anyone help me?
> Part of my code in the controller:
>
>        function edit($id = null) {
>                $this->Post->id = $id;
>                $sectors = $this->Post->Sector->find('list', array(
>
> 'fields' => array('id','combined_name'),
>
> 'conditions' => array('status' => 'A')
>
> )
>                );
>                $this->set(compact('sectors'));
>
>                if (empty($this->data)) {
>                        $this->data = $this->Post->read();
>                } else {
>                        if ($this->Post->save($this->data)) {
>                                $this->Session->setFlash('Your record has
> been updated.');
>                                $this->redirect(array('action' => 'index'));
>                        } else {
>                                $this->Session-
>>setFlash('Error.');
>                        }
>                }
>        }
>
> Thanks!
>
> Best regards.
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> 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
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> 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
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


RE: Validation errors only working in Add form, but not in Edit form.

2011-04-18 Thread Krissy Masters
if ($this->Post->save($this->data)) { you not forcing validation check

add true

if ($this->Post->save($this->data, true)) {

K

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of jackgoh
Sent: Monday, April 18, 2011 3:23 PM
To: CakePHP
Subject: Validation errors only working in Add form, but not in Edit form.

Hi,


The validation message is working in Add Form, but not in the Edit
Form, can anyone help me?
Part of my code in the controller:

function edit($id = null) {
$this->Post->id = $id;
$sectors = $this->Post->Sector->find('list', array(

'fields' => array('id','combined_name'),

'conditions' => array('status' => 'A')

)
);
$this->set(compact('sectors'));

if (empty($this->data)) {
$this->data = $this->Post->read();
} else {
if ($this->Post->save($this->data)) {
$this->Session->setFlash('Your record has
been updated.');
$this->redirect(array('action' => 'index'));
} else {
$this->Session-
>setFlash('Error.');
}
}
}

Thanks!

Best regards.

-- 
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Validation errors only working in Add form, but not in Edit form.

2011-04-18 Thread jackgoh
Hi,


The validation message is working in Add Form, but not in the Edit
Form, can anyone help me?
Part of my code in the controller:

function edit($id = null) {
$this->Post->id = $id;
$sectors = $this->Post->Sector->find('list', array(

'fields' => array('id','combined_name'),

'conditions' => array('status' => 'A')

)
);
$this->set(compact('sectors'));

if (empty($this->data)) {
$this->data = $this->Post->read();
} else {
if ($this->Post->save($this->data)) {
$this->Session->setFlash('Your record has been 
updated.');
$this->redirect(array('action' => 'index'));
} else {
$this->Session-
>setFlash('Error.');
}
}
}

Thanks!

Best regards.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Check for validation errors in a view

2010-09-28 Thread Matthias
Hi,
can i somehow see *in a view* whether a forma validation error
occurred? Like:
if ($form->hasErrors() )
   echo 'there was an error';
else
   echo 'please edit the entry';

Or can i only check for that in the controller and have to pass a
variable to the view?

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


Re: Form validation errors

2010-09-18 Thread Dr. Loboto
In this case better turn off persistentModel as you did and reopen
ticket. Looks like it is definitely CakePHP bug.

On Sep 17, 6:09 pm, Jeremy Burns | Class Outfit
 wrote:
> Thanks Dr Loboto. Unfortunately that has no effect.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 17 Sep 2010, at 11:56, Dr. Loboto wrote:
>
>
>
> > What if you call create() on this model before save()? Checked code
> > related to $persistModel and get lost there.
>
> > On Sep 17, 1:21 pm, Jeremy Burns | Class Outfit
> >  wrote:
> >> I have *really* solved it now. In my app_controller I had var 
> >> $persistModel = true; which I was lead to believe was a *good thing* from 
> >> a performance point of view. If I comment out that line my problem 
> >> disappears and I reliably get validation messages on screen.
>
> >> Before I leave this, can anyone shed any more light on this? Is this 
> >> behaviour correct, and what is the impact of leaving out persistModel?
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> >> On 17 Sep 2010, at 07:09, Jeremy Burns | Class Outfit wrote:
>
> >>> I jumped the gun. After I cleared the cache I resubmitted the form and 
> >>> got the validation error messages. Deep joy. I closed the ticket and told 
> >>> the world my problem was solved.
>
> >>> Then I resubmitted the form again - and no validation messages. This is 
> >>> repeatable: clear the cache, submit the form, see the validation 
> >>> messages. Resubmit the form - no validation messages. Clear the cache and 
> >>> start again.
>
> >>> Any clues?
>
> >>> Jeremy Burns
> >>> Class Outfit
>
> >>> jeremybu...@classoutfit.com
> >>> (t) +44 (0) 208 123 3822
> >>> (m) +44 (0) 7973 481949
> >>> Skype: jeremy_burns
> >>>http://www.classoutfit.com
>
> >>> On 17 Sep 2010, at 06:59, Jeremy Burns | Class Outfit wrote:
>
> >>>> OK - frustration over. I cleared the cache and ran it again, and all 
> >>>> works as expected. Very bizarre though, considering I started with an 
> >>>> empty cache and have cleared it many times during this debug process.
>
> >>>> Jeremy Burns
> >>>> Class Outfit
>
> >>>> jeremybu...@classoutfit.com
> >>>>http://www.classoutfit.com
>
> >>>> On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:
>
> >>>>> Thanks. Here's my findings from the test site.
>
> >>>>> get_class($this->Order->OrderItem->OrderAddress) returns 
> >>>>> 'OrderAddress', so the model is loaded.
>
> >>>>> I have littered debug statements throughout and the code is not 
> >>>>> erroring before or after the saves; the saves are happening and 
> >>>>> failing, producing validation errors.
>
> >>>>> I have created a variable ($validationErrors) and added the 
> >>>>> validationErrors as they occur (so at one point the array looks like 
> >>>>> $validationErrors['OrderAddress']['field_name'] => 'message').
>
> >>>>> I have added some debug statements before the form is rendered:
>
> >>>>> - debug($this->validationErrors); => empty
>
> >>>>> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => 
> >>>>> array of fields and messages as expected
>
> >>>>> - debug($validationErrors); => array of fields and messages as expected
>
> >>>>> Using the debug toolbar, I can see the variable 
> >>>>> $this->validationErrors, which is empty.
>
> >>>>> I have also passed $validationErrors as a variable, which is populated 
> >>>>> as expected.
>
> >>>>> So whilst I can see that validation is failing and errors are being 
> >>>>> recorded, they are not being displayed at the front end.
>
> >>>>> Here's the thing. This is exactly the same code as is running on my 
> >>>>> Mac. On my Mac using the debug toolbar I can see the variable 
> >>>>> $this->validationErrors has keys for each model that has validation 
> >>>>> errors (e.g. ['OrderAddress']).
>
> >>>>> So I'm still stumped.

Re: Form validation errors

2010-09-17 Thread Jeremy Burns | Class Outfit
Thanks Dr Loboto. Unfortunately that has no effect.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 17 Sep 2010, at 11:56, Dr. Loboto wrote:

> What if you call create() on this model before save()? Checked code
> related to $persistModel and get lost there.
> 
> On Sep 17, 1:21 pm, Jeremy Burns | Class Outfit
>  wrote:
>> I have *really* solved it now. In my app_controller I had var $persistModel 
>> = true; which I was lead to believe was a *good thing* from a performance 
>> point of view. If I comment out that line my problem disappears and I 
>> reliably get validation messages on screen.
>> 
>> Before I leave this, can anyone shed any more light on this? Is this 
>> behaviour correct, and what is the impact of leaving out persistModel?
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>> 
>> On 17 Sep 2010, at 07:09, Jeremy Burns | Class Outfit wrote:
>> 
>> 
>> 
>>> I jumped the gun. After I cleared the cache I resubmitted the form and got 
>>> the validation error messages. Deep joy. I closed the ticket and told the 
>>> world my problem was solved.
>> 
>>> Then I resubmitted the form again - and no validation messages. This is 
>>> repeatable: clear the cache, submit the form, see the validation messages. 
>>> Resubmit the form - no validation messages. Clear the cache and start again.
>> 
>>> Any clues?
>> 
>>> Jeremy Burns
>>> Class Outfit
>> 
>>> jeremybu...@classoutfit.com
>>> (t) +44 (0) 208 123 3822
>>> (m) +44 (0) 7973 481949
>>> Skype: jeremy_burns
>>> http://www.classoutfit.com
>> 
>>> On 17 Sep 2010, at 06:59, Jeremy Burns | Class Outfit wrote:
>> 
>>>> OK - frustration over. I cleared the cache and ran it again, and all works 
>>>> as expected. Very bizarre though, considering I started with an empty 
>>>> cache and have cleared it many times during this debug process.
>> 
>>>> Jeremy Burns
>>>> Class Outfit
>> 
>>>> jeremybu...@classoutfit.com
>>>> http://www.classoutfit.com
>> 
>>>> On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:
>> 
>>>>> Thanks. Here's my findings from the test site.
>> 
>>>>> get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', 
>>>>> so the model is loaded.
>> 
>>>>> I have littered debug statements throughout and the code is not erroring 
>>>>> before or after the saves; the saves are happening and failing, producing 
>>>>> validation errors.
>> 
>>>>> I have created a variable ($validationErrors) and added the 
>>>>> validationErrors as they occur (so at one point the array looks like 
>>>>> $validationErrors['OrderAddress']['field_name'] => 'message').
>> 
>>>>> I have added some debug statements before the form is rendered:
>> 
>>>>> - debug($this->validationErrors); => empty
>> 
>>>>> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => 
>>>>> array of fields and messages as expected
>> 
>>>>> - debug($validationErrors); => array of fields and messages as expected
>> 
>>>>> Using the debug toolbar, I can see the variable $this->validationErrors, 
>>>>> which is empty.
>> 
>>>>> I have also passed $validationErrors as a variable, which is populated as 
>>>>> expected.
>> 
>>>>> So whilst I can see that validation is failing and errors are being 
>>>>> recorded, they are not being displayed at the front end.
>> 
>>>>> Here's the thing. This is exactly the same code as is running on my Mac. 
>>>>> On my Mac using the debug toolbar I can see the variable 
>>>>> $this->validationErrors has keys for each model that has validation 
>>>>> errors (e.g. ['OrderAddress']).
>> 
>>>>> So I'm still stumped.
>> 
>>>>> I have tried to append items to $this->validationErrors, but none of them 
>>>>> have any effect.
>> 
>>>>> For additional information, here's how I am constructing my form and the 
>>>>> inputs:
>> 
>>>>> I have tried all sorts of varieties and each produces the same result:
&g

Re: Form validation errors

2010-09-17 Thread Dr. Loboto
What if you call create() on this model before save()? Checked code
related to $persistModel and get lost there.

On Sep 17, 1:21 pm, Jeremy Burns | Class Outfit
 wrote:
> I have *really* solved it now. In my app_controller I had var $persistModel = 
> true; which I was lead to believe was a *good thing* from a performance point 
> of view. If I comment out that line my problem disappears and I reliably get 
> validation messages on screen.
>
> Before I leave this, can anyone shed any more light on this? Is this 
> behaviour correct, and what is the impact of leaving out persistModel?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 17 Sep 2010, at 07:09, Jeremy Burns | Class Outfit wrote:
>
>
>
> > I jumped the gun. After I cleared the cache I resubmitted the form and got 
> > the validation error messages. Deep joy. I closed the ticket and told the 
> > world my problem was solved.
>
> > Then I resubmitted the form again - and no validation messages. This is 
> > repeatable: clear the cache, submit the form, see the validation messages. 
> > Resubmit the form - no validation messages. Clear the cache and start again.
>
> > Any clues?
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.com
> > (t) +44 (0) 208 123 3822
> > (m) +44 (0) 7973 481949
> > Skype: jeremy_burns
> >http://www.classoutfit.com
>
> > On 17 Sep 2010, at 06:59, Jeremy Burns | Class Outfit wrote:
>
> >> OK - frustration over. I cleared the cache and ran it again, and all works 
> >> as expected. Very bizarre though, considering I started with an empty 
> >> cache and have cleared it many times during this debug process.
>
> >> Jeremy Burns
> >> Class Outfit
>
> >> jeremybu...@classoutfit.com
> >>http://www.classoutfit.com
>
> >> On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:
>
> >>> Thanks. Here's my findings from the test site.
>
> >>> get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', 
> >>> so the model is loaded.
>
> >>> I have littered debug statements throughout and the code is not erroring 
> >>> before or after the saves; the saves are happening and failing, producing 
> >>> validation errors.
>
> >>> I have created a variable ($validationErrors) and added the 
> >>> validationErrors as they occur (so at one point the array looks like 
> >>> $validationErrors['OrderAddress']['field_name'] => 'message').
>
> >>> I have added some debug statements before the form is rendered:
>
> >>> - debug($this->validationErrors); => empty
>
> >>> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => 
> >>> array of fields and messages as expected
>
> >>> - debug($validationErrors); => array of fields and messages as expected
>
> >>> Using the debug toolbar, I can see the variable $this->validationErrors, 
> >>> which is empty.
>
> >>> I have also passed $validationErrors as a variable, which is populated as 
> >>> expected.
>
> >>> So whilst I can see that validation is failing and errors are being 
> >>> recorded, they are not being displayed at the front end.
>
> >>> Here's the thing. This is exactly the same code as is running on my Mac. 
> >>> On my Mac using the debug toolbar I can see the variable 
> >>> $this->validationErrors has keys for each model that has validation 
> >>> errors (e.g. ['OrderAddress']).
>
> >>> So I'm still stumped.
>
> >>> I have tried to append items to $this->validationErrors, but none of them 
> >>> have any effect.
>
> >>> For additional information, here's how I am constructing my form and the 
> >>> inputs:
>
> >>> I have tried all sorts of varieties and each produces the same result:
> >>> echo $this->Form->create(array('class' => 'order-form')); /*this is the 
> >>> currently deployed option */
> >>> echo $this->Form->create('Order', array('class' => 'order-form'));
> >>> echo $this->Form->create('Order', array('action' => 'your_details', 
> >>> 'class' => 'order-form'));
> >>> echo $this->Form->create('OrderAddress', array('ur

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
I have *really* solved it now. In my app_controller I had var $persistModel = 
true; which I was lead to believe was a *good thing* from a performance point 
of view. If I comment out that line my problem disappears and I reliably get 
validation messages on screen.

Before I leave this, can anyone shed any more light on this? Is this behaviour 
correct, and what is the impact of leaving out persistModel?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 17 Sep 2010, at 07:09, Jeremy Burns | Class Outfit wrote:

> I jumped the gun. After I cleared the cache I resubmitted the form and got 
> the validation error messages. Deep joy. I closed the ticket and told the 
> world my problem was solved.
> 
> Then I resubmitted the form again - and no validation messages. This is 
> repeatable: clear the cache, submit the form, see the validation messages. 
> Resubmit the form - no validation messages. Clear the cache and start again.
> 
> Any clues?
> 
> Jeremy Burns
> Class Outfit
> 
> jeremybu...@classoutfit.com
> (t) +44 (0) 208 123 3822
> (m) +44 (0) 7973 481949
> Skype: jeremy_burns
> http://www.classoutfit.com
> 
> On 17 Sep 2010, at 06:59, Jeremy Burns | Class Outfit wrote:
> 
>> OK - frustration over. I cleared the cache and ran it again, and all works 
>> as expected. Very bizarre though, considering I started with an empty cache 
>> and have cleared it many times during this debug process.
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.com
>> http://www.classoutfit.com
>> 
>> On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:
>> 
>>> Thanks. Here's my findings from the test site.
>>> 
>>> get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', so 
>>> the model is loaded.
>>> 
>>> I have littered debug statements throughout and the code is not erroring 
>>> before or after the saves; the saves are happening and failing, producing 
>>> validation errors.
>>> 
>>> I have created a variable ($validationErrors) and added the 
>>> validationErrors as they occur (so at one point the array looks like 
>>> $validationErrors['OrderAddress']['field_name'] => 'message').
>>> 
>>> I have added some debug statements before the form is rendered:
>>> 
>>> - debug($this->validationErrors); => empty
>>> 
>>> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => array 
>>> of fields and messages as expected
>>> 
>>> - debug($validationErrors); => array of fields and messages as expected
>>> 
>>> Using the debug toolbar, I can see the variable $this->validationErrors, 
>>> which is empty.
>>> 
>>> I have also passed $validationErrors as a variable, which is populated as 
>>> expected.
>>> 
>>> So whilst I can see that validation is failing and errors are being 
>>> recorded, they are not being displayed at the front end.
>>> 
>>> Here's the thing. This is exactly the same code as is running on my Mac. On 
>>> my Mac using the debug toolbar I can see the variable 
>>> $this->validationErrors has keys for each model that has validation errors 
>>> (e.g. ['OrderAddress']).
>>> 
>>> So I'm still stumped.
>>> 
>>> I have tried to append items to $this->validationErrors, but none of them 
>>> have any effect.
>>> 
>>> For additional information, here's how I am constructing my form and the 
>>> inputs:
>>> 
>>> I have tried all sorts of varieties and each produces the same result:
>>> echo $this->Form->create(array('class' => 'order-form')); /*this is the 
>>> currently deployed option */
>>> echo $this->Form->create('Order', array('class' => 'order-form'));
>>> echo $this->Form->create('Order', array('action' => 'your_details', 'class' 
>>> => 'order-form'));
>>> echo $this->Form->create('OrderAddress', array('url' => 'your_details', 
>>> 'class' => 'order-form'));
>>> 
>>> Inputs are fairly standard: echo 
>>> $this->Form->input('OrderAddress.address1');
>>> 
>>> Jeremy Burns
>>> Class Outfit
>>> 
>>> jeremybu...@classoutfit.com
>>> http://w

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
I jumped the gun. After I cleared the cache I resubmitted the form and got the 
validation error messages. Deep joy. I closed the ticket and told the world my 
problem was solved.

Then I resubmitted the form again - and no validation messages. This is 
repeatable: clear the cache, submit the form, see the validation messages. 
Resubmit the form - no validation messages. Clear the cache and start again.

Any clues?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
(t) +44 (0) 208 123 3822
(m) +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 17 Sep 2010, at 06:59, Jeremy Burns | Class Outfit wrote:

> OK - frustration over. I cleared the cache and ran it again, and all works as 
> expected. Very bizarre though, considering I started with an empty cache and 
> have cleared it many times during this debug process.
> 
> Jeremy Burns
> Class Outfit
> 
> jeremybu...@classoutfit.com
> http://www.classoutfit.com
> 
> On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:
> 
>> Thanks. Here's my findings from the test site.
>> 
>> get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', so 
>> the model is loaded.
>> 
>> I have littered debug statements throughout and the code is not erroring 
>> before or after the saves; the saves are happening and failing, producing 
>> validation errors.
>> 
>> I have created a variable ($validationErrors) and added the validationErrors 
>> as they occur (so at one point the array looks like 
>> $validationErrors['OrderAddress']['field_name'] => 'message').
>> 
>> I have added some debug statements before the form is rendered:
>> 
>> - debug($this->validationErrors); => empty
>> 
>> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => array 
>> of fields and messages as expected
>> 
>> - debug($validationErrors); => array of fields and messages as expected
>> 
>> Using the debug toolbar, I can see the variable $this->validationErrors, 
>> which is empty.
>> 
>> I have also passed $validationErrors as a variable, which is populated as 
>> expected.
>> 
>> So whilst I can see that validation is failing and errors are being 
>> recorded, they are not being displayed at the front end.
>> 
>> Here's the thing. This is exactly the same code as is running on my Mac. On 
>> my Mac using the debug toolbar I can see the variable 
>> $this->validationErrors has keys for each model that has validation errors 
>> (e.g. ['OrderAddress']).
>> 
>> So I'm still stumped.
>> 
>> I have tried to append items to $this->validationErrors, but none of them 
>> have any effect.
>> 
>> For additional information, here's how I am constructing my form and the 
>> inputs:
>> 
>> I have tried all sorts of varieties and each produces the same result:
>> echo $this->Form->create(array('class' => 'order-form')); /*this is the 
>> currently deployed option */
>> echo $this->Form->create('Order', array('class' => 'order-form'));
>> echo $this->Form->create('Order', array('action' => 'your_details', 'class' 
>> => 'order-form'));
>> echo $this->Form->create('OrderAddress', array('url' => 'your_details', 
>> 'class' => 'order-form'));
>> 
>> Inputs are fairly standard: echo $this->Form->input('OrderAddress.address1');
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.com
>> http://www.classoutfit.com
>> 
>> On 17 Sep 2010, at 03:46, Dr. Loboto wrote:
>> 
>>> Output get_class($this->MyModelThatDontValidate) or call custom model
>>> method to check that models are really loaded. Also check that you
>>> approach save() or validates() call in controller and don't get error
>>> before that abandon save/validation. Be sure that debug > 0. In most
>>> of cases such errors have true silly reason and 0.1% is for buggy
>>> software combination on target server.
>>> 
>>> On Sep 17, 12:33 am, Jeremy Burns | Class Outfit
>>>  wrote:
>>>> Nope, not correct. All models named correctly - and don't forget exactly 
>>>> this same code works on my Mac. If your theory was right then I'd be 
>>>> getting all sorts of errors and the forms wouldn't pull any data at all. 
>>>> In 

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
OK - frustration over. I cleared the cache and ran it again, and all works as 
expected. Very bizarre though, considering I started with an empty cache and 
have cleared it many times during this debug process.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 17 Sep 2010, at 06:51, Jeremy Burns | Class Outfit wrote:

> Thanks. Here's my findings from the test site.
> 
> get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', so 
> the model is loaded.
> 
> I have littered debug statements throughout and the code is not erroring 
> before or after the saves; the saves are happening and failing, producing 
> validation errors.
> 
> I have created a variable ($validationErrors) and added the validationErrors 
> as they occur (so at one point the array looks like 
> $validationErrors['OrderAddress']['field_name'] => 'message').
> 
> I have added some debug statements before the form is rendered:
> 
> - debug($this->validationErrors); => empty
> 
> - debug($this->Order->OrderItem->OrderAddress->validationErrors); => array of 
> fields and messages as expected
> 
> - debug($validationErrors); => array of fields and messages as expected
> 
> Using the debug toolbar, I can see the variable $this->validationErrors, 
> which is empty.
> 
> I have also passed $validationErrors as a variable, which is populated as 
> expected.
> 
> So whilst I can see that validation is failing and errors are being recorded, 
> they are not being displayed at the front end.
> 
> Here's the thing. This is exactly the same code as is running on my Mac. On 
> my Mac using the debug toolbar I can see the variable $this->validationErrors 
> has keys for each model that has validation errors (e.g. ['OrderAddress']).
> 
> So I'm still stumped.
> 
> I have tried to append items to $this->validationErrors, but none of them 
> have any effect.
> 
> For additional information, here's how I am constructing my form and the 
> inputs:
> 
> I have tried all sorts of varieties and each produces the same result:
> echo $this->Form->create(array('class' => 'order-form')); /*this is the 
> currently deployed option */
> echo $this->Form->create('Order', array('class' => 'order-form'));
> echo $this->Form->create('Order', array('action' => 'your_details', 'class' 
> => 'order-form'));
> echo $this->Form->create('OrderAddress', array('url' => 'your_details', 
> 'class' => 'order-form'));
> 
> Inputs are fairly standard: echo $this->Form->input('OrderAddress.address1');
> 
> Jeremy Burns
> Class Outfit
> 
> jeremybu...@classoutfit.com
> http://www.classoutfit.com
> 
> On 17 Sep 2010, at 03:46, Dr. Loboto wrote:
> 
>> Output get_class($this->MyModelThatDontValidate) or call custom model
>> method to check that models are really loaded. Also check that you
>> approach save() or validates() call in controller and don't get error
>> before that abandon save/validation. Be sure that debug > 0. In most
>> of cases such errors have true silly reason and 0.1% is for buggy
>> software combination on target server.
>> 
>> On Sep 17, 12:33 am, Jeremy Burns | Class Outfit
>>  wrote:
>>> Nope, not correct. All models named correctly - and don't forget exactly 
>>> this same code works on my Mac. If your theory was right then I'd be 
>>> getting all sorts of errors and the forms wouldn't pull any data at all. In 
>>> my case, $this->validationErrors is empty.
>>> 
>>> Jeremy Burns
>>> Class Outfit
>>> 
>>> jeremybu...@classoutfit.com
>>> (t) +44 (0) 208 123 3822
>>> (m) +44 (0) 7973 481949
>>> Skype: jeremy_burnshttp://www.classoutfit.com
>>> 
>>> On 16 Sep 2010, at 18:30, Dr. Loboto wrote:
>>> 
>>> 
>>> 
>>>> 99.9% - your models are not loaded at all because you named them not
>>>> in lowercase.
>>> 
>>>> On 16 сен, 20:52, Jeremy Burns  wrote:
>>>>> I'm a bit stumped. I've developed some code on my local machine (MAMP)
>>>>> and when a form fails validation I get the right error messages
>>>>> displayed in the right places. I have used the form helper to create
>>>>> the form and the inputs, but have not used any code to produce the
>>>>> error messa

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
Thanks. Here's my findings from the test site.

get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', so the 
model is loaded.

I have littered debug statements throughout and the code is not erroring before 
or after the saves; the saves are happening and failing, producing validation 
errors.

I have created a variable ($validationErrors) and added the validationErrors as 
they occur (so at one point the array looks like 
$validationErrors['OrderAddress']['field_name'] => 'message').

I have added some debug statements before the form is rendered:

- debug($this->validationErrors); => empty

- debug($this->Order->OrderItem->OrderAddress->validationErrors); => array of 
fields and messages as expected

- debug($validationErrors); => array of fields and messages as expected

Using the debug toolbar, I can see the variable $this->validationErrors, which 
is empty.

I have also passed $validationErrors as a variable, which is populated as 
expected.

So whilst I can see that validation is failing and errors are being recorded, 
they are not being displayed at the front end.

Here's the thing. This is exactly the same code as is running on my Mac. On my 
Mac using the debug toolbar I can see the variable $this->validationErrors has 
keys for each model that has validation errors (e.g. ['OrderAddress']).

So I'm still stumped.

I have tried to append items to $this->validationErrors, but none of them have 
any effect.

For additional information, here's how I am constructing my form and the inputs:

I have tried all sorts of varieties and each produces the same result:
echo $this->Form->create(array('class' => 'order-form')); /*this is the 
currently deployed option */
echo $this->Form->create('Order', array('class' => 'order-form'));
echo $this->Form->create('Order', array('action' => 'your_details', 'class' => 
'order-form'));
echo $this->Form->create('OrderAddress', array('url' => 'your_details', 'class' 
=> 'order-form'));

Inputs are fairly standard: echo $this->Form->input('OrderAddress.address1');

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 17 Sep 2010, at 03:46, Dr. Loboto wrote:

> Output get_class($this->MyModelThatDontValidate) or call custom model
> method to check that models are really loaded. Also check that you
> approach save() or validates() call in controller and don't get error
> before that abandon save/validation. Be sure that debug > 0. In most
> of cases such errors have true silly reason and 0.1% is for buggy
> software combination on target server.
> 
> On Sep 17, 12:33 am, Jeremy Burns | Class Outfit
>  wrote:
>> Nope, not correct. All models named correctly - and don't forget exactly 
>> this same code works on my Mac. If your theory was right then I'd be getting 
>> all sorts of errors and the forms wouldn't pull any data at all. In my case, 
>> $this->validationErrors is empty.
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.com
>> (t) +44 (0) 208 123 3822
>> (m) +44 (0) 7973 481949
>> Skype: jeremy_burnshttp://www.classoutfit.com
>> 
>> On 16 Sep 2010, at 18:30, Dr. Loboto wrote:
>> 
>> 
>> 
>>> 99.9% - your models are not loaded at all because you named them not
>>> in lowercase.
>> 
>>> On 16 сен, 20:52, Jeremy Burns  wrote:
>>>> I'm a bit stumped. I've developed some code on my local machine (MAMP)
>>>> and when a form fails validation I get the right error messages
>>>> displayed in the right places. I have used the form helper to create
>>>> the form and the inputs, but have not used any code to produce the
>>>> error messages - I am leaving that to Cake's magic.
>> 
>>>> I have moved the site lock, stock and barrel to a remote test server,
>>>> and - boom - no error messages.
>> 
>>>> Anyone got any pointers about why this might happen, and what are the
>>>> golden rules to ensure that Cake waves its magic wand appropriately?
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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-

Re: Form validation errors

2010-09-16 Thread Dr. Loboto
Output get_class($this->MyModelThatDontValidate) or call custom model
method to check that models are really loaded. Also check that you
approach save() or validates() call in controller and don't get error
before that abandon save/validation. Be sure that debug > 0. In most
of cases such errors have true silly reason and 0.1% is for buggy
software combination on target server.

On Sep 17, 12:33 am, Jeremy Burns | Class Outfit
 wrote:
> Nope, not correct. All models named correctly - and don't forget exactly this 
> same code works on my Mac. If your theory was right then I'd be getting all 
> sorts of errors and the forms wouldn't pull any data at all. In my case, 
> $this->validationErrors is empty.
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.com
> (t) +44 (0) 208 123 3822
> (m) +44 (0) 7973 481949
> Skype: jeremy_burnshttp://www.classoutfit.com
>
> On 16 Sep 2010, at 18:30, Dr. Loboto wrote:
>
>
>
> > 99.9% - your models are not loaded at all because you named them not
> > in lowercase.
>
> > On 16 сен, 20:52, Jeremy Burns  wrote:
> >> I'm a bit stumped. I've developed some code on my local machine (MAMP)
> >> and when a form fails validation I get the right error messages
> >> displayed in the right places. I have used the form helper to create
> >> the form and the inputs, but have not used any code to produce the
> >> error messages - I am leaving that to Cake's magic.
>
> >> I have moved the site lock, stock and barrel to a remote test server,
> >> and - boom - no error messages.
>
> >> Anyone got any pointers about why this might happen, and what are the
> >> golden rules to ensure that Cake waves its magic wand appropriately?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
> > athttp://groups.google.com/group/cake-php?hl=en

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


Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
Nope, not correct. All models named correctly - and don't forget exactly this 
same code works on my Mac. If your theory was right then I'd be getting all 
sorts of errors and the forms wouldn't pull any data at all. In my case, 
$this->validationErrors is empty.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
(t) +44 (0) 208 123 3822
(m) +44 (0) 7973 481949
Skype: jeremy_burns
http://www.classoutfit.com

On 16 Sep 2010, at 18:30, Dr. Loboto wrote:

> 99.9% - your models are not loaded at all because you named them not
> in lowercase.
> 
> On 16 сен, 20:52, Jeremy Burns  wrote:
>> I'm a bit stumped. I've developed some code on my local machine (MAMP)
>> and when a form fails validation I get the right error messages
>> displayed in the right places. I have used the form helper to create
>> the form and the inputs, but have not used any code to produce the
>> error messages - I am leaving that to Cake's magic.
>> 
>> I have moved the site lock, stock and barrel to a remote test server,
>> and - boom - no error messages.
>> 
>> Anyone got any pointers about why this might happen, and what are the
>> golden rules to ensure that Cake waves its magic wand appropriately?
> 
> 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

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


Re: Form validation errors

2010-09-16 Thread Dr. Loboto
99.9% - your models are not loaded at all because you named them not
in lowercase.

On 16 сен, 20:52, Jeremy Burns  wrote:
> I'm a bit stumped. I've developed some code on my local machine (MAMP)
> and when a form fails validation I get the right error messages
> displayed in the right places. I have used the form helper to create
> the form and the inputs, but have not used any code to produce the
> error messages - I am leaving that to Cake's magic.
>
> I have moved the site lock, stock and barrel to a remote test server,
> and - boom - no error messages.
>
> Anyone got any pointers about why this might happen, and what are the
> golden rules to ensure that Cake waves its magic wand appropriately?

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


Form validation errors

2010-09-16 Thread Jeremy Burns
I'm a bit stumped. I've developed some code on my local machine (MAMP)
and when a form fails validation I get the right error messages
displayed in the right places. I have used the form helper to create
the form and the inputs, but have not used any code to produce the
error messages - I am leaving that to Cake's magic.

I have moved the site lock, stock and barrel to a remote test server,
and - boom - no error messages.

Anyone got any pointers about why this might happen, and what are the
golden rules to ensure that Cake waves its magic wand appropriately?

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-16 Thread Miles J
Do you mean something like this? 
http://milesj.me/blog/read/10/Displaying-Form-Errors-As-A-List-In-CakePHP

On Aug 15, 8:35 am, euromark  wrote:
> if you bake your views/forms
> this should be done automatically
>
> IF you set up your model relations accordingly anyway
> maybe somethings wrong here
> you should post your code for details
>
> On 15 Aug., 16:30, Petr Vytlaèil  wrote:
>
> > Hi I will try to describe my problem better:
>
> > I have database tables addresses and user so i have two models User
> > and Address.
> > User haveone malingaddress (class Address) and billaddress (class
> > Address) this is definate in model User.
> > How is registration form where are inputs for information about user
> > some: User.name, User.phone ...
> > And inputs for Mailing and billing address: Mailingaddress.street,
> > Billingaddress.street
>
> > -- now i want before save this data to database valid inputs with
> > validations rules from model Address, source:
>
> > 
> > $this->Address->create($this->data['Maillingaddress']);
> > if($this->Address->validate()$this->data['Maillingaddress']){
> >     $this->Address->save($this->data['Maillingaddress']);}
>
> > And now when data arent valid a want show errors in form, but Form
> > helper get errors for inputs in form from model and data model name
> > isnt some as name input form:
> > Address.street != Mallingaddress.street
>
> > Is any way how a cane prepare this errors and send to helper?
>
> > Have you understand?
>
> > On 15 srp, 10:10, "rez...@gmail.com"  wrote:
>
> > > what's meant of redirect this errors for concrete input or group
> > > inputs ?
> > > really I want to help you
> > > Sorry , I can't understand what you want

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


Validation errors not being displayed

2010-08-16 Thread Mike
My Order model belongsTo both a DeliveryContact and a BillingContact.
It looks like this:

class Order extends AppModel {

var $belongsTo=array(
'DeliveryContact'=>array(
'className'=>'Contact'
),
'BillingContact'=>array(
'className'=>'Contact'
)
);

}


My view looks like this:

echo $form->create('Order');
echo $form->input('DeliveryContact.name');
echo $form->input('DeliveryContact.address');
echo $form->end('Next');

And in my controller action for this view I have something like:

$this->Order->DeliveryContact->set($this->data['DeliveryContact']);
if ($this->Order->DeliveryContact->validates()) {
 proceedToNextStep();
}

The validation errors are not being pulled through properly. If I do
debug($this->validationErrors) in my view I get:

Array
(
[Contact] => Array
(
[name] => Please enter your name
[address] => Please enter your address
)

)

Clearly I need to be populating
View::validationErrors['DeliveryContact'] instead of
View::validationErrors['Contact'], but I don't know how to accomplish
this, any ideas?


Thanks

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-15 Thread euromark
if you bake your views/forms
this should be done automatically

IF you set up your model relations accordingly anyway
maybe somethings wrong here
you should post your code for details


On 15 Aug., 16:30, Petr Vytlačil  wrote:
> Hi I will try to describe my problem better:
>
> I have database tables addresses and user so i have two models User
> and Address.
> User haveone malingaddress (class Address) and billaddress (class
> Address) this is definate in model User.
> How is registration form where are inputs for information about user
> some: User.name, User.phone ...
> And inputs for Mailing and billing address: Mailingaddress.street,
> Billingaddress.street
>
> -- now i want before save this data to database valid inputs with
> validations rules from model Address, source:
>
> 
> $this->Address->create($this->data['Maillingaddress']);
> if($this->Address->validate()$this->data['Maillingaddress']){
>     $this->Address->save($this->data['Maillingaddress']);}
>
> And now when data arent valid a want show errors in form, but Form
> helper get errors for inputs in form from model and data model name
> isnt some as name input form:
> Address.street != Mallingaddress.street
>
> Is any way how a cane prepare this errors and send to helper?
>
> Have you understand?
>
> On 15 srp, 10:10, "rez...@gmail.com"  wrote:
>
>
>
> > what's meant of redirect this errors for concrete input or group
> > inputs ?
> > really I want to help you
> > Sorry , I can't understand what you want

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-15 Thread Jeremy Burns | Class Outfit
Make some deliberate input errors in your form, and then place this in your 
Address model code:

die(debug($this->validationErrors));

This will show you the output of your validation errors array, and then you'll 
know what values to extract and display.

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 15 Aug 2010, at 15:30, Petr Vytlačil wrote:

> Hi I will try to describe my problem better:
> 
> I have database tables addresses and user so i have two models User
> and Address.
> User haveone malingaddress (class Address) and billaddress (class
> Address) this is definate in model User.
> How is registration form where are inputs for information about user
> some: User.name, User.phone ...
> And inputs for Mailing and billing address: Mailingaddress.street,
> Billingaddress.street
> 
> -- now i want before save this data to database valid inputs with
> validations rules from model Address, source:
> 
> 
> $this->Address->create($this->data['Maillingaddress']);
> if($this->Address->validate()$this->data['Maillingaddress']){
>$this->Address->save($this->data['Maillingaddress']);
> }
> And now when data arent valid a want show errors in form, but Form
> helper get errors for inputs in form from model and data model name
> isnt some as name input form:
> Address.street != Mallingaddress.street
> 
> Is any way how a cane prepare this errors and send to helper?
> 
> Have you understand?
> 
> On 15 srp, 10:10, "rez...@gmail.com"  wrote:
>> what's meant of redirect this errors for concrete input or group
>> inputs ?
>> really I want to help you
>> Sorry , I can't understand what you want
> 
> 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

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-15 Thread Petr Vytlačil
Hi I will try to describe my problem better:

I have database tables addresses and user so i have two models User
and Address.
User haveone malingaddress (class Address) and billaddress (class
Address) this is definate in model User.
How is registration form where are inputs for information about user
some: User.name, User.phone ...
And inputs for Mailing and billing address: Mailingaddress.street,
Billingaddress.street

-- now i want before save this data to database valid inputs with
validations rules from model Address, source:


$this->Address->create($this->data['Maillingaddress']);
if($this->Address->validate()$this->data['Maillingaddress']){
$this->Address->save($this->data['Maillingaddress']);
}
And now when data arent valid a want show errors in form, but Form
helper get errors for inputs in form from model and data model name
isnt some as name input form:
Address.street != Mallingaddress.street

Is any way how a cane prepare this errors and send to helper?

Have you understand?

On 15 srp, 10:10, "rez...@gmail.com"  wrote:
> what's meant of redirect this errors for concrete input or group
> inputs ?
> really I want to help you
> Sorry , I can't understand what you want

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-15 Thread Zaky Katalan-Ezra
Same here

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-15 Thread rez...@gmail.com
what's meant of redirect this errors for concrete input or group
inputs ?
really I want to help you
Sorry , I can't understand what you want

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


Re: How can I display CakePHP input validation errors in a different container input

2010-08-13 Thread Petr Vytlačil
Nobody know solution?

On 13 srp, 13:22, Petr Vytlačil  wrote:
> Hi is any way how i can display input validation errors in different
> container input?
> For examle a have model address and user model has deliver and billing
> address sou a need in form for greate user account twice inputs for
> address.
>
> $form->input(Deliveraddress.street);
> $form->input(Deliveraddress.city);
>
> $form->input(Billingaddress.street);
> $form->input(Billingaddress.city);
>
> Model address has set some validation rules and now i want save
> deliveraddress and billingaddress and when i get some valid error i
> wat show error i input pro deliver and billingaddress.
>
> Can i redirect this errors for concrete input or group inputs?
>
> THX

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 can I display CakePHP input validation errors in a different container input

2010-08-13 Thread Petr Vytlačil
Hi is any way how i can display input validation errors in different
container input?
For examle a have model address and user model has deliver and billing
address sou a need in form for greate user account twice inputs for
address.

$form->input(Deliveraddress.street);
$form->input(Deliveraddress.city);


$form->input(Billingaddress.street);
$form->input(Billingaddress.city);

Model address has set some validation rules and now i want save
deliveraddress and billingaddress and when i get some valid error i
wat show error i input pro deliver and billingaddress.

Can i redirect this errors for concrete input or group inputs?

THX

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


Re: Validation errors not shown in a form

2010-07-30 Thread Norman Paniagua
Can you add a filter in your gmail account I add the filter for the sender (
cake-php@googlegroups.com) and all the mails that I receive from this email
have the gmail label cakephp. Try it, its very helpful
---

Norman Paniagua


2010/7/29 John 

> Hi Guys, sorry for the wrong topic, but i'm new here.
>
> Just a tip for the group... would be great if in the subject of the emails,
> a tag [cakePHP] was inserted, will be easy to read the new posts...
>
> Thanks for let me join here, hope i can help/be helped
>
> Have a nice day
>
> On Jul 30, 2010, at 12:08 AM, Roland Pish wrote:
>
> > Hi.
> >
> > Suddenly a form stopped showing the error messages with the  > class="error-message"> beside input fields with validation.
> > When a validation error occurs. If I debug($this->Themodel-
> >> validationErrors) it shows me the errors but there is no  > class="error-message"> anymore.
> >
> > What could be wrong?
> >
> > I don't remember changing anything in cake's core.
> >
> > Any clue on this?
> >
> > Regards
> >
> > 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.comFor
> >  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors not shown in a form

2010-07-30 Thread John
Hi Guys, sorry for the wrong topic, but i'm new here.

Just a tip for the group... would be great if in the subject of the emails, a 
tag [cakePHP] was inserted, will be easy to read the new posts...

Thanks for let me join here, hope i can help/be helped

Have a nice day

On Jul 30, 2010, at 12:08 AM, Roland Pish wrote:

> Hi.
> 
> Suddenly a form stopped showing the error messages with the  class="error-message"> beside input fields with validation.
> When a validation error occurs. If I debug($this->Themodel-
>> validationErrors) it shows me the errors but there is no  class="error-message"> anymore.
> 
> What could be wrong?
> 
> I don't remember changing anything in cake's core.
> 
> Any clue on this?
> 
> Regards
> 
> 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

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


Re: Validation errors not shown in a form

2010-07-30 Thread Roland Pish
Thanks Norman and Marco.
Yes I'm creating it with $form helper.
The weird thing is that it was showing errors normally as it would,
but another guy included some code and another input fields and after
that suddenly the errors stopped showing. And I don't see anything
abnormal in this guy's added code and inputs.
As a test, I also removed what he did and the same thing happened,
$this->Themodel->validationErrors contains the validation errors, but
the form is not showing those errors anymore.

It's a long long code, so I'll try to paste it in a bin and let you
know then.

Thanks!

On 30 jul, 04:13, Marco  wrote:
> Are you sure you are using the $form->input for all the fields and
> $form->create?
>
> On Jul 30, 2:19 am, Norman Paniagua  wrote:
>
> > Can you show your code?
> > ---
>
> > Norman Paniagua
>
> > 2010/7/29 Roland Pish 
>
> > > Hi.
>
> > > Suddenly a form stopped showing the error messages with the  > > class="error-message"> beside input fields with validation.
> > > When a validation error occurs. If I debug($this->Themodel-
> > > >validationErrors) it shows me the errors but there is no  > > class="error-message"> anymore.
>
> > > What could be wrong?
>
> > > I don't remember changing anything in cake's core.
>
> > > Any clue on this?
>
> > > Regards
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 > >  om>For more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en

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


Re: Validation errors not shown in a form

2010-07-30 Thread Marco
Are you sure you are using the $form->input for all the fields and
$form->create?

On Jul 30, 2:19 am, Norman Paniagua  wrote:
> Can you show your code?
> ---
>
> Norman Paniagua
>
> 2010/7/29 Roland Pish 
>
>
>
> > Hi.
>
> > Suddenly a form stopped showing the error messages with the  > class="error-message"> beside input fields with validation.
> > When a validation error occurs. If I debug($this->Themodel-
> > >validationErrors) it shows me the errors but there is no  > class="error-message"> anymore.
>
> > What could be wrong?
>
> > I don't remember changing anything in cake's core.
>
> > Any clue on this?
>
> > Regards
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

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


Re: Validation errors not shown in a form

2010-07-29 Thread Norman Paniagua
Can you show your code?
---

Norman Paniagua


2010/7/29 Roland Pish 

> Hi.
>
> Suddenly a form stopped showing the error messages with the  class="error-message"> beside input fields with validation.
> When a validation error occurs. If I debug($this->Themodel-
> >validationErrors) it shows me the errors but there is no  class="error-message"> anymore.
>
> What could be wrong?
>
> I don't remember changing anything in cake's core.
>
> Any clue on this?
>
> Regards
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Validation errors not shown in a form

2010-07-29 Thread Roland Pish
Hi.

Suddenly a form stopped showing the error messages with the  beside input fields with validation.
When a validation error occurs. If I debug($this->Themodel-
>validationErrors) it shows me the errors but there is no  anymore.

What could be wrong?

I don't remember changing anything in cake's core.

Any clue on this?

Regards

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


Re: validation errors

2010-06-24 Thread Melanie Sommer
Hello Mark,

thank you for your detailled explanation. It works :-)

Melanie

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


Re: validation errors

2010-06-21 Thread euromark
If you are interested in the details, I wrote an article and explained
why you need to do it this way:
http://www.dereuromark.de/2010/06/20/validating-multiple-models-at-once/

cheers
mark


On 20 Jun., 12:18, euromark  wrote:
> actually its quite easy for multiple model validations
>
> $this->Post->set($this->data);
> $this->Post->User->set($this->data);
>
> $val1 = $this->Post->validates(array('fieldList'=>$val1List));
> $val2 = $this->Post->User->validates(array('fieldList'=>$val2List);
>
> if ($val1 && $val2) { // OK } else { ... }
>
> cake automatically passes the errors to the view
> the field list part is optional
>
> note: the set part is very important in this case (thats what you
> missed)
>
> On 20 Jun., 09:33, Melanie Sommer 
> wrote:
>
> > > Because Cake do not save if validation failed and pass validation
> > > errors to view automatically. Form helper render these errors when use
> > > $from->input() method.
>
> > Yes it does and it works beautifully - but not for input fields that
> > do not belong of the current model.
>
> > If my Model1 has only Model1.fieldA, Model1.fieldB and Model1.fieldC
> > and I have a second Model2 with fields Model2.fieldD and Model2.fieldE
> > and I am using Model1/add
> > then, validation errors for Model2.fieldD and Model2.fieldE are not
> > displayed.
>
> > I looked at the definition of the FormHelper and what I understand is
> > that FormHelper calls the function tagIsInvalid() that returns an
> > array with all the errors of the current model (or: input names).
> > I thought that there might be a way to add the errors of other models
> > to that array, so that cake also displays errors the errors of Model2
> > and not only Model1.
>
> > I do not know whether this is the way to do that.
>
> > How can I generally display errors for an input field if cake does not
> > do it automatically? I did not find anything in the cookbook for
> > FormHelper.
>
> > Melanie

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


Re: validation errors

2010-06-20 Thread euromark
actually its quite easy for multiple model validations

$this->Post->set($this->data);
$this->Post->User->set($this->data);

$val1 = $this->Post->validates(array('fieldList'=>$val1List));
$val2 = $this->Post->User->validates(array('fieldList'=>$val2List);

if ($val1 && $val2) { // OK } else { ... }

cake automatically passes the errors to the view
the field list part is optional

note: the set part is very important in this case (thats what you
missed)


On 20 Jun., 09:33, Melanie Sommer 
wrote:
> > Because Cake do not save if validation failed and pass validation
> > errors to view automatically. Form helper render these errors when use
> > $from->input() method.
>
> Yes it does and it works beautifully - but not for input fields that
> do not belong of the current model.
>
> If my Model1 has only Model1.fieldA, Model1.fieldB and Model1.fieldC
> and I have a second Model2 with fields Model2.fieldD and Model2.fieldE
> and I am using Model1/add
> then, validation errors for Model2.fieldD and Model2.fieldE are not
> displayed.
>
> I looked at the definition of the FormHelper and what I understand is
> that FormHelper calls the function tagIsInvalid() that returns an
> array with all the errors of the current model (or: input names).
> I thought that there might be a way to add the errors of other models
> to that array, so that cake also displays errors the errors of Model2
> and not only Model1.
>
> I do not know whether this is the way to do that.
>
> How can I generally display errors for an input field if cake does not
> do it automatically? I did not find anything in the cookbook for
> FormHelper.
>
> Melanie

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


Re: validation errors

2010-06-20 Thread Melanie Sommer
> Because Cake do not save if validation failed and pass validation
> errors to view automatically. Form helper render these errors when use
> $from->input() method.
Yes it does and it works beautifully - but not for input fields that
do not belong of the current model.

If my Model1 has only Model1.fieldA, Model1.fieldB and Model1.fieldC
and I have a second Model2 with fields Model2.fieldD and Model2.fieldE
and I am using Model1/add
then, validation errors for Model2.fieldD and Model2.fieldE are not
displayed.

I looked at the definition of the FormHelper and what I understand is
that FormHelper calls the function tagIsInvalid() that returns an
array with all the errors of the current model (or: input names).
I thought that there might be a way to add the errors of other models
to that array, so that cake also displays errors the errors of Model2
and not only Model1.

I do not know whether this is the way to do that.

How can I generally display errors for an input field if cake does not
do it automatically? I did not find anything in the cookbook for
FormHelper.

Melanie

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


Re: validation errors

2010-06-19 Thread Dr. Loboto
Ordinary all you need is:

if ($this->Model->save($this->data)) {
// success code
}
else {
// failure code
}

Because Cake do not save if validation failed and pass validation
errors to view automatically. Form helper render these errors when use
$from->input() method.

On Jun 19, 2:06 pm, Melanie Sommer 
wrote:
> Hi,
>
> In an add view I have several input fields that contain data for more
> than one model. I sort, validate and save this data in the controller
> using
>
> if($this->Model->validates()){
>     $this->Model->create();
>     if($this->Model->save($data)){
>         ...
>     }else{
>         ...
>     }}else{
>
>     $errors = $this->Lamp->invalidFields();
>
> }
>
> In case of validation errors, is there a clever way to get the $errors
> array to the view? I think cake stores the validation errors of the
> current model in an array, which seems to be somehow associated with
> $form->tagIsInvalid()
> Is there a way to add the errors of the other models to that array to
> use cakes automagic behaviour to display the error?
>
> Thank you for your help!
> Melanie

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


validation errors

2010-06-19 Thread Melanie Sommer
Hi,

In an add view I have several input fields that contain data for more
than one model. I sort, validate and save this data in the controller
using

if($this->Model->validates()){
$this->Model->create();
if($this->Model->save($data)){
...
}else{
...
}
}else{
$errors = $this->Lamp->invalidFields();
}

In case of validation errors, is there a clever way to get the $errors
array to the view? I think cake stores the validation errors of the
current model in an array, which seems to be somehow associated with
$form->tagIsInvalid()
Is there a way to add the errors of the other models to that array to
use cakes automagic behaviour to display the error?


Thank you for your help!
Melanie

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


Re: Validation errors

2010-05-23 Thread John Andersen
I never uses other than $form->input() myself, so never saw your
issue. Although I do use the "type" option in order to ensure a
correct field type - not relying on the automagic of the $form->input
method :)

About now it would be good to hear something from one of the CakePHP
experts, so hopefully one will show up :)
Enjoy,
   John

On May 23, 6:41 pm, Ed Propsner  wrote:
> @John
>
> You're right, I went back and looked and I was indeed using $form->input()
> on the earlier forms. I understand that $form->input has a bit of
> "automagic" that comes along with it but I honestly never would have never
> given a second thought that $form->select() wouldn't be so concerned with
> validation. My forms aren't just a select fields, they are a mixed bag of
> all kinds of elements (would that make a diff?) although none are using
> $form->input() at this point. I'm not sure why I switched to coding the form
> elements differently in the first place, I guess I figured that if there's a
> specific tag available for the job, why not use it? It says right in the
> book under the form helper description "FormHelper focuses on creating forms
> quickly, in a way that will streamline validation, re-population and
> layout". I had my sights set on the part about streamlining validation but
> then again, it does validate.
>
> Since they are both form helpers what would make the difference of why one
> displays the errors and the other don't? They both re-populate and do
> everything else they are supposed to. I would imagine that if you didn't
> want the message you could just omit 'message' => from the validation in the
> model. If what you're saying is indeed correct then I don't feel entirely
> foolish over this one. It would be very misleading to have some form helpers
> display the messages while others don't and not have that clearly defined in
> the book (or am I missing that part?).
>
> Thanks John
>
> - Ed
>
[snip]

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


Re: Validation errors

2010-05-23 Thread Ed Propsner
@John

You're right, I went back and looked and I was indeed using $form->input()
on the earlier forms. I understand that $form->input has a bit of
"automagic" that comes along with it but I honestly never would have never
given a second thought that $form->select() wouldn't be so concerned with
validation. My forms aren't just a select fields, they are a mixed bag of
all kinds of elements (would that make a diff?) although none are using
$form->input() at this point. I'm not sure why I switched to coding the form
elements differently in the first place, I guess I figured that if there's a
specific tag available for the job, why not use it? It says right in the
book under the form helper description "FormHelper focuses on creating forms
quickly, in a way that will streamline validation, re-population and
layout". I had my sights set on the part about streamlining validation but
then again, it does validate.

Since they are both form helpers what would make the difference of why one
displays the errors and the other don't? They both re-populate and do
everything else they are supposed to. I would imagine that if you didn't
want the message you could just omit 'message' => from the validation in the
model. If what you're saying is indeed correct then I don't feel entirely
foolish over this one. It would be very misleading to have some form helpers
display the messages while others don't and not have that clearly defined in
the book (or am I missing that part?).

Thanks John

- Ed

On Sun, May 23, 2010 at 7:35 AM, John Andersen wrote:

> Just for my own curiosity, I tried to implement your setup, and it is
> correct, the select will be validated, but the error message will not
> be displayed.
>
> The reason may be that you are using:
>
> $form->select('ProfileAttribute.gender', array('M' => 'Male', 'F' =>
> 'Female'), false, array('empty' => 'Please choose'));
>
> instead of:
>
> $form->input('ProfileAttribute.gender', array('empty' => 'Please
> choose'));
>
> where the last gets the option values from the controller set method.
>
> Browsing through the form helper code, it seems to me, that the form
> helper method select, does not concern itself with errors returned
> from the validation. On the other hand, the form helper method input
> does so.
>
> Maybe you should consult your other code samples and confirm that you
> are using the $form->select() and not the $form->input() to display
> the select field!
> Enjoy,
>John
>
>
>
> On May 23, 9:30 am, Ed Propsner  wrote:
> > It worked just fine to pull the errors out of the array and display them
> > manually, it was just more coding than I would have liked.
> > I was more interested in finding out what caused the problem in the first
> > place more than I was finding an 'alternative' for validation and
> displaying
> > errors.
> >
> > Honestly, I'm over it 8-) The forms are all done and working.
> > If I find out what the problem is now it would probably just make me want
> to
> > drop kick my computer because the solution always ends up being something
> > ridiculously simple staring me in the face the whole time. It's the
> nature
> > of the beast 8-)
> >
> [snip]
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-23 Thread John Andersen
Just for my own curiosity, I tried to implement your setup, and it is
correct, the select will be validated, but the error message will not
be displayed.

The reason may be that you are using:

$form->select('ProfileAttribute.gender', array('M' => 'Male', 'F' =>
'Female'), false, array('empty' => 'Please choose'));

instead of:

$form->input('ProfileAttribute.gender', array('empty' => 'Please
choose'));

where the last gets the option values from the controller set method.

Browsing through the form helper code, it seems to me, that the form
helper method select, does not concern itself with errors returned
from the validation. On the other hand, the form helper method input
does so.

Maybe you should consult your other code samples and confirm that you
are using the $form->select() and not the $form->input() to display
the select field!
Enjoy,
   John



On May 23, 9:30 am, Ed Propsner  wrote:
> It worked just fine to pull the errors out of the array and display them
> manually, it was just more coding than I would have liked.
> I was more interested in finding out what caused the problem in the first
> place more than I was finding an 'alternative' for validation and displaying
> errors.
>
> Honestly, I'm over it 8-) The forms are all done and working.
> If I find out what the problem is now it would probably just make me want to
> drop kick my computer because the solution always ends up being something
> ridiculously simple staring me in the face the whole time. It's the nature
> of the beast 8-)
>
[snip]

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


Re: Validation errors

2010-05-23 Thread Muataz aziz
On Sat, May 22, 2010 at 4:14 PM, Matteo  wrote:

> Hi,
>
> you could try this:
>
> http://cakeqs.org/eng/questions/view/validation_summary
>
> there are many posts about validation under cakephp questions, I would
> check there too if you already didn't.
>
> Then lastly I would try changing model name and check if validation
> behaves correctly.
>
> Hope it helps.
>
> Matteo
>
> On May 22, 10:22 am, Ed Propsner  wrote:
> > @Master Ram
> >
> > I appreciate the advice but doesn't this seem a bit long winded for
> > something that normally requires no code at all besides the validation
> rules
> > in the model?
> >
> >  if ($form->isFieldError('Model_name.Field_name')){
> >
> > e($form->error('Model_name.Field_name',
> > null,
> > array(
> > 'class' => 'failure')
> >   ));
> > }
> >
> > What if you have a form with say 20 fields that need to be validated?
> >
> > There is reason the validation errors are not outputting to the page,
> > instead of a work around I'd be more interested in finding the cause to
> the
> > problem.
> >
> > @Matteo,
> >
> > Thanks, I looked it over but nothing seemed to apply.
> >
> >
> >
> >
> >
> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> > > Hi,
> >
> > > you can check my post here and see if it - maybe - fits your needs.
> > > Please, see last reply.
> >
> > >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d.
> ..
> >
> > > Matteo
> >
> > > On May 22, 8:50 am, Ed Propsner  wrote:
> > > > I have a form that is not displaying validation errors like it should
> be.
> > > > The errors are there in the validationErrors array so the model is
> > > > validating, I'm sure of that.
> > > > I've been reading through a few other threads on the same subject but
> > > none
> > > > of the causes seem to apply.
> >
> > > > I have the controller and the model stripped down to next to nothing.
> >
> > > > [controller]
> >
> > > > function add()
> > > > {
> > > > if(!empty($this->data))
> > > > {
> > > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> > > > $this->ProfileAttrib->save($this->data);
> >
> > > > }
> > > > }
> >
> > > > [/controller]
> >
> > > > Then in the model I validate field 'gender'
> >
> > > > [model]
> >
> > > > class ProfileAttrib extends AppModel
> > > >  {
> >
> > > > var $name = 'ProfileAttrib';
> >
> > > >  var $validate = array(
> > > >   'gender' => array(
> > > > 'rule' => 'notEmpty',
> > > > 'message' => 'Message here'
> > > > )
> > > >  );
> >
> > > > }
> >
> > > > [/model]
> >
> > > > I also stripped down the view to just a form and a single field for
> > > gender.
> > > > Whatever the reason is that validation messages aren't displaying I'm
> > > really
> > > > not seeing it.
> > > > I can't strip things down any more than what they are now.
> >
> > > > Any advice?
> >
> > > > - Ed
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> 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 athttp://
> > > groups.google.com/group/cake-php?hl=en
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others
> > > with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to thi

Re: Validation errors

2010-05-22 Thread Ed Propsner
It worked just fine to pull the errors out of the array and display them
manually, it was just more coding than I would have liked.
I was more interested in finding out what caused the problem in the first
place more than I was finding an 'alternative' for validation and displaying
errors.

Honestly, I'm over it 8-) The forms are all done and working.
If I find out what the problem is now it would probably just make me want to
drop kick my computer because the solution always ends up being something
ridiculously simple staring me in the face the whole time. It's the nature
of the beast 8-)

On Sun, May 23, 2010 at 2:21 AM, Filipe Teles Rodrigues <
filipe.t2...@gmail.com> wrote:

> There is this option: http://book.cakephp.org/view/198/options-error
> But is not very good to do things different from the patterns
>
>
> 2010/5/23 Ed Propsner 
>
>> It returns exactly what I would expect it to:
>>
>> Array ( [ProfileAttribute] => Array ( [gender] => Male ) )
>>
>> Everything with the data seems to be fine, the model is even validating as
>> expected.
>> The $this->validateErrors array is loaded with the error messages, they
>> are just not displaying.
>>
>> I'm assuming it's  something I did because all of my original forms that I
>> made before the problem started all work just fine, no probs.
>>
>>
>> On Sun, May 23, 2010 at 1:38 AM, Filipe Teles Rodrigues <
>> filipe.t2...@gmail.com> wrote:
>>
>>> This is strange. Put here the output of pr($this->data) before the
>>> validation.
>>>
>>> 2010/5/23 Ed Propsner 
>>>
>>> The models were all baked originally but edited as I went along.
>>>> One of the tests was with a freshly baked model and controller but the
>>>> view was not.
>>>> The view in that case only consisted of a form, one field, and a submit
>>>> button ... it still didn't work.
>>>>
>>>> I'm not quite sure what got changed or altered but I've been through 4
>>>> more forms since and with every
>>>> one of them I had to manually display the validation errors.
>>>>
>>>> I guess I broke it 8-)
>>>>
>>>>
>>>> On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues <
>>>> filipe.t2...@gmail.com> wrote:
>>>>
>>>>> Have you done these models with bake? If not, you could bake a model
>>>>> and see how it makes the forms, views, validations, etc. Maybe it helps.
>>>>>
>>>>> 2010/5/22 Ed Propsner 
>>>>>
>>>>> Now I'm really stumped. The new form I just created is having the same
>>>>>> problem with validation errors.
>>>>>> What am I overlooking here?
>>>>>>
>>>>>>
>>>>>> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner wrote:
>>>>>>
>>>>>>> Yup, I did and there was no problems with it.
>>>>>>>
>>>>>>> I think I'm to the point where I'm going to kick the entire problem
>>>>>>> to the curb.
>>>>>>> I manually pulled the errors from $this->validationErrors array and
>>>>>>> displayed them that way.
>>>>>>>
>>>>>>> I'll be starting another model, controller, etc. for another form
>>>>>>> shortly and if the problem persists ... well, I dunno 8-)
>>>>>>> I was convinced it was something I was doing wrong because I have a
>>>>>>> handful of other forms that all function flawlessly with validation 
>>>>>>> errors -
>>>>>>> this is the only one I had problems with.
>>>>>>>
>>>>>>> - Ed
>>>>>>>
>>>>>>>
>>>>>>> On Sat, May 22, 2010 at 1:45 PM, John Andersen >>>>>> gmail.com> wrote:
>>>>>>>
>>>>>>>> Ok :)
>>>>>>>> Have you tried to use the method described by Master Ram, just so it
>>>>>>>> can be confirmed that the validation errors do get to the form
>>>>>>>> helper?
>>>>>>>> Enjoy,
>>>>>>>>   John
>>>>>>>>
>>>>>>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>>>>>>> > @john,
>>>>>>>> >
>>>>>>>> > Sorry about t

Re: Validation errors

2010-05-22 Thread Filipe Teles Rodrigues
There is this option: http://book.cakephp.org/view/198/options-error
But is not very good to do things different from the patterns

2010/5/23 Ed Propsner 

> It returns exactly what I would expect it to:
>
> Array ( [ProfileAttribute] => Array ( [gender] => Male ) )
>
> Everything with the data seems to be fine, the model is even validating as
> expected.
> The $this->validateErrors array is loaded with the error messages, they are
> just not displaying.
>
> I'm assuming it's  something I did because all of my original forms that I
> made before the problem started all work just fine, no probs.
>
>
> On Sun, May 23, 2010 at 1:38 AM, Filipe Teles Rodrigues <
> filipe.t2...@gmail.com> wrote:
>
>> This is strange. Put here the output of pr($this->data) before the
>> validation.
>>
>> 2010/5/23 Ed Propsner 
>>
>> The models were all baked originally but edited as I went along.
>>> One of the tests was with a freshly baked model and controller but the
>>> view was not.
>>> The view in that case only consisted of a form, one field, and a submit
>>> button ... it still didn't work.
>>>
>>> I'm not quite sure what got changed or altered but I've been through 4
>>> more forms since and with every
>>> one of them I had to manually display the validation errors.
>>>
>>> I guess I broke it 8-)
>>>
>>>
>>> On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues <
>>> filipe.t2...@gmail.com> wrote:
>>>
>>>> Have you done these models with bake? If not, you could bake a model and
>>>> see how it makes the forms, views, validations, etc. Maybe it helps.
>>>>
>>>> 2010/5/22 Ed Propsner 
>>>>
>>>> Now I'm really stumped. The new form I just created is having the same
>>>>> problem with validation errors.
>>>>> What am I overlooking here?
>>>>>
>>>>>
>>>>> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner wrote:
>>>>>
>>>>>> Yup, I did and there was no problems with it.
>>>>>>
>>>>>> I think I'm to the point where I'm going to kick the entire problem to
>>>>>> the curb.
>>>>>> I manually pulled the errors from $this->validationErrors array and
>>>>>> displayed them that way.
>>>>>>
>>>>>> I'll be starting another model, controller, etc. for another form
>>>>>> shortly and if the problem persists ... well, I dunno 8-)
>>>>>> I was convinced it was something I was doing wrong because I have a
>>>>>> handful of other forms that all function flawlessly with validation 
>>>>>> errors -
>>>>>> this is the only one I had problems with.
>>>>>>
>>>>>> - Ed
>>>>>>
>>>>>>
>>>>>> On Sat, May 22, 2010 at 1:45 PM, John Andersen >>>>> gmail.com> wrote:
>>>>>>
>>>>>>> Ok :)
>>>>>>> Have you tried to use the method described by Master Ram, just so it
>>>>>>> can be confirmed that the validation errors do get to the form
>>>>>>> helper?
>>>>>>> Enjoy,
>>>>>>>   John
>>>>>>>
>>>>>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>>>>>> > @john,
>>>>>>> >
>>>>>>> > Sorry about that. I was grasping at straws and scrapped everything
>>>>>>> and
>>>>>>> > started over since my original post.
>>>>>>> > The names are  consistent across MVC. It now uses
>>>>>>> "ProfileAttribute"
>>>>>>> >
>>>>>>> > - Ed
>>>>>>> [snip]
>>>>>>>
>>>>>>> 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.comFor
>>>>>>&g

Re: Validation errors

2010-05-22 Thread Ed Propsner
It returns exactly what I would expect it to:

Array ( [ProfileAttribute] => Array ( [gender] => Male ) )

Everything with the data seems to be fine, the model is even validating as
expected.
The $this->validateErrors array is loaded with the error messages, they are
just not displaying.

I'm assuming it's  something I did because all of my original forms that I
made before the problem started all work just fine, no probs.


On Sun, May 23, 2010 at 1:38 AM, Filipe Teles Rodrigues <
filipe.t2...@gmail.com> wrote:

> This is strange. Put here the output of pr($this->data) before the
> validation.
>
> 2010/5/23 Ed Propsner 
>
> The models were all baked originally but edited as I went along.
>> One of the tests was with a freshly baked model and controller but the
>> view was not.
>> The view in that case only consisted of a form, one field, and a submit
>> button ... it still didn't work.
>>
>> I'm not quite sure what got changed or altered but I've been through 4
>> more forms since and with every
>> one of them I had to manually display the validation errors.
>>
>> I guess I broke it 8-)
>>
>>
>> On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues <
>> filipe.t2...@gmail.com> wrote:
>>
>>> Have you done these models with bake? If not, you could bake a model and
>>> see how it makes the forms, views, validations, etc. Maybe it helps.
>>>
>>> 2010/5/22 Ed Propsner 
>>>
>>> Now I'm really stumped. The new form I just created is having the same
>>>> problem with validation errors.
>>>> What am I overlooking here?
>>>>
>>>>
>>>> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner wrote:
>>>>
>>>>> Yup, I did and there was no problems with it.
>>>>>
>>>>> I think I'm to the point where I'm going to kick the entire problem to
>>>>> the curb.
>>>>> I manually pulled the errors from $this->validationErrors array and
>>>>> displayed them that way.
>>>>>
>>>>> I'll be starting another model, controller, etc. for another form
>>>>> shortly and if the problem persists ... well, I dunno 8-)
>>>>> I was convinced it was something I was doing wrong because I have a
>>>>> handful of other forms that all function flawlessly with validation 
>>>>> errors -
>>>>> this is the only one I had problems with.
>>>>>
>>>>> - Ed
>>>>>
>>>>>
>>>>> On Sat, May 22, 2010 at 1:45 PM, John Andersen >>>> gmail.com> wrote:
>>>>>
>>>>>> Ok :)
>>>>>> Have you tried to use the method described by Master Ram, just so it
>>>>>> can be confirmed that the validation errors do get to the form helper?
>>>>>> Enjoy,
>>>>>>   John
>>>>>>
>>>>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>>>>> > @john,
>>>>>> >
>>>>>> > Sorry about that. I was grasping at straws and scrapped everything
>>>>>> and
>>>>>> > started over since my original post.
>>>>>> > The names are  consistent across MVC. It now uses "ProfileAttribute"
>>>>>> >
>>>>>> > - Ed
>>>>>> [snip]
>>>>>>
>>>>>> 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.comFor
>>>>>>  more options, visit this group at
>>>>>> http://groups.google.com/group/cake-php?hl=en
>>>>>>
>>>>>
>>>>>
>>>>  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, se

Re: Validation errors

2010-05-22 Thread Filipe Teles Rodrigues
This is strange. Put here the output of pr($this->data) before the
validation.

2010/5/23 Ed Propsner 

> The models were all baked originally but edited as I went along.
> One of the tests was with a freshly baked model and controller but the view
> was not.
> The view in that case only consisted of a form, one field, and a submit
> button ... it still didn't work.
>
> I'm not quite sure what got changed or altered but I've been through 4 more
> forms since and with every
> one of them I had to manually display the validation errors.
>
> I guess I broke it 8-)
>
>
> On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues <
> filipe.t2...@gmail.com> wrote:
>
>> Have you done these models with bake? If not, you could bake a model and
>> see how it makes the forms, views, validations, etc. Maybe it helps.
>>
>> 2010/5/22 Ed Propsner 
>>
>> Now I'm really stumped. The new form I just created is having the same
>>> problem with validation errors.
>>> What am I overlooking here?
>>>
>>>
>>> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner wrote:
>>>
>>>> Yup, I did and there was no problems with it.
>>>>
>>>> I think I'm to the point where I'm going to kick the entire problem to
>>>> the curb.
>>>> I manually pulled the errors from $this->validationErrors array and
>>>> displayed them that way.
>>>>
>>>> I'll be starting another model, controller, etc. for another form
>>>> shortly and if the problem persists ... well, I dunno 8-)
>>>> I was convinced it was something I was doing wrong because I have a
>>>> handful of other forms that all function flawlessly with validation errors 
>>>> -
>>>> this is the only one I had problems with.
>>>>
>>>> - Ed
>>>>
>>>>
>>>> On Sat, May 22, 2010 at 1:45 PM, John Andersen >>> > wrote:
>>>>
>>>>> Ok :)
>>>>> Have you tried to use the method described by Master Ram, just so it
>>>>> can be confirmed that the validation errors do get to the form helper?
>>>>> Enjoy,
>>>>>   John
>>>>>
>>>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>>>> > @john,
>>>>> >
>>>>> > Sorry about that. I was grasping at straws and scrapped everything
>>>>> and
>>>>> > started over since my original post.
>>>>> > The names are  consistent across MVC. It now uses "ProfileAttribute"
>>>>> >
>>>>> > - Ed
>>>>> [snip]
>>>>>
>>>>> 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.comFor
>>>>>  more options, visit this group at
>>>>> http://groups.google.com/group/cake-php?hl=en
>>>>>
>>>>
>>>>
>>>  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.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  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.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-22 Thread Ed Propsner
The models were all baked originally but edited as I went along.
One of the tests was with a freshly baked model and controller but the view
was not.
The view in that case only consisted of a form, one field, and a submit
button ... it still didn't work.

I'm not quite sure what got changed or altered but I've been through 4 more
forms since and with every
one of them I had to manually display the validation errors.

I guess I broke it 8-)

On Sun, May 23, 2010 at 1:13 AM, Filipe Teles Rodrigues <
filipe.t2...@gmail.com> wrote:

> Have you done these models with bake? If not, you could bake a model and
> see how it makes the forms, views, validations, etc. Maybe it helps.
>
> 2010/5/22 Ed Propsner 
>
> Now I'm really stumped. The new form I just created is having the same
>> problem with validation errors.
>> What am I overlooking here?
>>
>>
>> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner wrote:
>>
>>> Yup, I did and there was no problems with it.
>>>
>>> I think I'm to the point where I'm going to kick the entire problem to
>>> the curb.
>>> I manually pulled the errors from $this->validationErrors array and
>>> displayed them that way.
>>>
>>> I'll be starting another model, controller, etc. for another form shortly
>>> and if the problem persists ... well, I dunno 8-)
>>> I was convinced it was something I was doing wrong because I have a
>>> handful of other forms that all function flawlessly with validation errors -
>>> this is the only one I had problems with.
>>>
>>> - Ed
>>>
>>>
>>> On Sat, May 22, 2010 at 1:45 PM, John Andersen 
>>> wrote:
>>>
>>>> Ok :)
>>>> Have you tried to use the method described by Master Ram, just so it
>>>> can be confirmed that the validation errors do get to the form helper?
>>>> Enjoy,
>>>>   John
>>>>
>>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>>> > @john,
>>>> >
>>>> > Sorry about that. I was grasping at straws and scrapped everything and
>>>> > started over since my original post.
>>>> > The names are  consistent across MVC. It now uses "ProfileAttribute"
>>>> >
>>>> > - Ed
>>>> [snip]
>>>>
>>>> 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.comFor
>>>>  more options, visit this group at
>>>> http://groups.google.com/group/cake-php?hl=en
>>>>
>>>
>>>
>>  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.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-22 Thread Filipe Teles Rodrigues
Have you done these models with bake? If not, you could bake a model and see
how it makes the forms, views, validations, etc. Maybe it helps.

2010/5/22 Ed Propsner 

> Now I'm really stumped. The new form I just created is having the same
> problem with validation errors.
> What am I overlooking here?
>
>
> On Sat, May 22, 2010 at 1:54 PM, Ed Propsner  wrote:
>
>> Yup, I did and there was no problems with it.
>>
>> I think I'm to the point where I'm going to kick the entire problem to the
>> curb.
>> I manually pulled the errors from $this->validationErrors array and
>> displayed them that way.
>>
>> I'll be starting another model, controller, etc. for another form shortly
>> and if the problem persists ... well, I dunno 8-)
>> I was convinced it was something I was doing wrong because I have a
>> handful of other forms that all function flawlessly with validation errors -
>> this is the only one I had problems with.
>>
>> - Ed
>>
>>
>> On Sat, May 22, 2010 at 1:45 PM, John Andersen 
>> wrote:
>>
>>> Ok :)
>>> Have you tried to use the method described by Master Ram, just so it
>>> can be confirmed that the validation errors do get to the form helper?
>>> Enjoy,
>>>   John
>>>
>>> On May 22, 8:39 pm, Ed Propsner  wrote:
>>> > @john,
>>> >
>>> > Sorry about that. I was grasping at straws and scrapped everything and
>>> > started over since my original post.
>>> > The names are  consistent across MVC. It now uses "ProfileAttribute"
>>> >
>>> > - Ed
>>> [snip]
>>>
>>> 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.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>
>  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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-22 Thread Ed Propsner
Now I'm really stumped. The new form I just created is having the same
problem with validation errors.
What am I overlooking here?

On Sat, May 22, 2010 at 1:54 PM, Ed Propsner  wrote:

> Yup, I did and there was no problems with it.
>
> I think I'm to the point where I'm going to kick the entire problem to the
> curb.
> I manually pulled the errors from $this->validationErrors array and
> displayed them that way.
>
> I'll be starting another model, controller, etc. for another form shortly
> and if the problem persists ... well, I dunno 8-)
> I was convinced it was something I was doing wrong because I have a handful
> of other forms that all function flawlessly with validation errors - this is
> the only one I had problems with.
>
> - Ed
>
>
> On Sat, May 22, 2010 at 1:45 PM, John Andersen wrote:
>
>> Ok :)
>> Have you tried to use the method described by Master Ram, just so it
>> can be confirmed that the validation errors do get to the form helper?
>> Enjoy,
>>   John
>>
>> On May 22, 8:39 pm, Ed Propsner  wrote:
>> > @john,
>> >
>> > Sorry about that. I was grasping at straws and scrapped everything and
>> > started over since my original post.
>> > The names are  consistent across MVC. It now uses "ProfileAttribute"
>> >
>> > - Ed
>> [snip]
>>
>> 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.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>

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


Re: Validation errors

2010-05-22 Thread Ed Propsner
Yup, I did and there was no problems with it.

I think I'm to the point where I'm going to kick the entire problem to the
curb.
I manually pulled the errors from $this->validationErrors array and
displayed them that way.

I'll be starting another model, controller, etc. for another form shortly
and if the problem persists ... well, I dunno 8-)
I was convinced it was something I was doing wrong because I have a handful
of other forms that all function flawlessly with validation errors - this is
the only one I had problems with.

- Ed

On Sat, May 22, 2010 at 1:45 PM, John Andersen wrote:

> Ok :)
> Have you tried to use the method described by Master Ram, just so it
> can be confirmed that the validation errors do get to the form helper?
> Enjoy,
>   John
>
> On May 22, 8:39 pm, Ed Propsner  wrote:
> > @john,
> >
> > Sorry about that. I was grasping at straws and scrapped everything and
> > started over since my original post.
> > The names are  consistent across MVC. It now uses "ProfileAttribute"
> >
> > - Ed
> [snip]
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-22 Thread John Andersen
Ok :)
Have you tried to use the method described by Master Ram, just so it
can be confirmed that the validation errors do get to the form helper?
Enjoy,
   John

On May 22, 8:39 pm, Ed Propsner  wrote:
> @john,
>
> Sorry about that. I was grasping at straws and scrapped everything and
> started over since my original post.
> The names are  consistent across MVC. It now uses "ProfileAttribute"
>
> - Ed
[snip]

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


Re: Validation errors

2010-05-22 Thread Ed Propsner
@john,

Sorry about that. I was grasping at straws and scrapped everything and
started over since my original post.
The names are  consistent across MVC. It now uses "ProfileAttribute"

- Ed

On Sat, May 22, 2010 at 1:35 PM, John Andersen wrote:

> There are som inconsistencies in your code!
>
> In the view you name the model "ProfileAttribute" but in the
> controller you use ProfileAttrib, which is also what you named the
> model.
>
> Could that be the reason?
>   John
>
> On May 22, 7:34 pm, Ed Propsner  wrote:
> > There's not much too it. Just a form and a single field.
> >
> > [view]
> >
> > echo $form->create('ProfileAttribute', array('controller' =>
> > 'profile-attributes', 'action' => 'add'))
> >
> > .$form->select('ProfileAttribute.gender', array(
> >  'M' => 'Male',
> >  'F' => 'Female'
> > ), null,
> > array(
> >  'empty' => '---'
> >  )
> > )
> >
> > .$html->para(null, $button->makeButton('submit', 'submitAttribs', 'Save',
> > null), null)
> > .$form->end();
> >
> > [/code]
> >
> > On Sat, May 22, 2010 at 12:28 PM, John Andersen  >wrote:
> >
> >
> >
> > > Could you post the view code, I haven't seen your presentation of that
> > > in the thread!
> > > Enjoy,
> > >   John
> >
> > > On May 22, 7:24 pm, Ed Propsner  wrote:
> > > > I tried to rename the model and everything associated with it and
> that
> > > > didn't work.
> >
> > > > I scrapped the model, controller, views, table ... everything. I
> started
> > > all
> > > > over again with it (I let the console create everything) and still
> have
> > > the
> > > > same problem.
> >
> > > > Everything happens (or don't happen) for a reason and I must be
> missing
> > > > something somewhere that's causing this ... feels like a really
> messed up
> > > > game of Where's Waldo 8-)
> >
> > > > Anyhow, as much I hate to and really shouldn't have to, I'm going to
> > > concede
> > > > and manually pull the errors out of the array for the sake of
> progress
> > > and
> > > > my own sanity.
> >
> > > > If anyone has any other ideas I'm all ears.
> >
> > > > - Ed
> >
> > > > On Sat, May 22, 2010 at 11:29 AM, Ed Propsner 
> > > wrote:
> > > > > @Matteo,
> >
> > > > > I've looked through all the materials and I did try a few things
> but it
> > > > > still don't work.
> >
> > > > > I'm actually going to trash the model and everything associated
> with it
> > > and
> > > > > start over and see what I get then.
> >
> > > > > It's an extreme solution but I've tried everything I could think of
> to
> > > no
> > > > > avail. It makes little sense.
> >
> > > > > On Sat, May 22, 2010 at 10:14 AM, Matteo 
> wrote:
> >
> > > > >> Hi,
> >
> > > > >> you could try this:
> >
> > > > >>http://cakeqs.org/eng/questions/view/validation_summary
> >
> > > > >> there are many posts about validation under cakephp questions, I
> would
> > > > >> check there too if you already didn't.
> >
> > > > >> Then lastly I would try changing model name and check if
> validation
> > > > >> behaves correctly.
> >
> > > > >> Hope it helps.
> >
> > > > >> Matteo
> >
> > > > >> On May 22, 10:22 am, Ed Propsner  wrote:
> > > > >> > @Master Ram
> >
> > > > >> > I appreciate the advice but doesn't this seem a bit long winded
> for
> > > > >> > something that normally requires no code at all besides the
> > > validation
> > > > >> rules
> > > > >> > in the model?
> >
> > > > >> >  if ($form->isFieldError('Model_name.Field_name')){
> >
> > > > >> > e($form->error('Model_name.Field_name',
> > > > >> > null,
> > > > >> >

Re: Validation errors

2010-05-22 Thread John Andersen
There are som inconsistencies in your code!

In the view you name the model "ProfileAttribute" but in the
controller you use ProfileAttrib, which is also what you named the
model.

Could that be the reason?
   John

On May 22, 7:34 pm, Ed Propsner  wrote:
> There's not much too it. Just a form and a single field.
>
> [view]
>
> echo $form->create('ProfileAttribute', array('controller' =>
> 'profile-attributes', 'action' => 'add'))
>
> .$form->select('ProfileAttribute.gender', array(
>  'M' => 'Male',
>  'F' => 'Female'
> ), null,
> array(
>  'empty' => '---'
>  )
> )
>
> .$html->para(null, $button->makeButton('submit', 'submitAttribs', 'Save',
> null), null)
> .$form->end();
>
> [/code]
>
> On Sat, May 22, 2010 at 12:28 PM, John Andersen 
> wrote:
>
>
>
> > Could you post the view code, I haven't seen your presentation of that
> > in the thread!
> > Enjoy,
> >   John
>
> > On May 22, 7:24 pm, Ed Propsner  wrote:
> > > I tried to rename the model and everything associated with it and that
> > > didn't work.
>
> > > I scrapped the model, controller, views, table ... everything. I started
> > all
> > > over again with it (I let the console create everything) and still have
> > the
> > > same problem.
>
> > > Everything happens (or don't happen) for a reason and I must be missing
> > > something somewhere that's causing this ... feels like a really messed up
> > > game of Where's Waldo 8-)
>
> > > Anyhow, as much I hate to and really shouldn't have to, I'm going to
> > concede
> > > and manually pull the errors out of the array for the sake of progress
> > and
> > > my own sanity.
>
> > > If anyone has any other ideas I'm all ears.
>
> > > - Ed
>
> > > On Sat, May 22, 2010 at 11:29 AM, Ed Propsner 
> > wrote:
> > > > @Matteo,
>
> > > > I've looked through all the materials and I did try a few things but it
> > > > still don't work.
>
> > > > I'm actually going to trash the model and everything associated with it
> > and
> > > > start over and see what I get then.
>
> > > > It's an extreme solution but I've tried everything I could think of to
> > no
> > > > avail. It makes little sense.
>
> > > > On Sat, May 22, 2010 at 10:14 AM, Matteo  wrote:
>
> > > >> Hi,
>
> > > >> you could try this:
>
> > > >>http://cakeqs.org/eng/questions/view/validation_summary
>
> > > >> there are many posts about validation under cakephp questions, I would
> > > >> check there too if you already didn't.
>
> > > >> Then lastly I would try changing model name and check if validation
> > > >> behaves correctly.
>
> > > >> Hope it helps.
>
> > > >> Matteo
>
> > > >> On May 22, 10:22 am, Ed Propsner  wrote:
> > > >> > @Master Ram
>
> > > >> > I appreciate the advice but doesn't this seem a bit long winded for
> > > >> > something that normally requires no code at all besides the
> > validation
> > > >> rules
> > > >> > in the model?
>
> > > >> >  if ($form->isFieldError('Model_name.Field_name')){
>
> > > >> >             e($form->error('Model_name.Field_name',
> > > >> >                             null,
> > > >> >                             array(
> > > >> >                             'class' => 'failure')
> > > >> >                           ));
> > > >> >         }
>
> > > >> > What if you have a form with say 20 fields that need to be
> > validated?
>
> > > >> > There is reason the validation errors are not outputting to the
> > page,
> > > >> > instead of a work around I'd be more interested in finding the cause
> > to
> > > >> the
> > > >> > problem.
>
> > > >> > @Matteo,
>
> > > >> > Thanks, I looked it over but nothing seemed to apply.
>
> > > >> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> > > >> >

Re: Validation errors

2010-05-22 Thread Ed Propsner
There's not much too it. Just a form and a single field.

[view]

echo $form->create('ProfileAttribute', array('controller' =>
'profile-attributes', 'action' => 'add'))

.$form->select('ProfileAttribute.gender', array(
 'M' => 'Male',
 'F' => 'Female'
), null,
array(
 'empty' => '---'
 )
)

.$html->para(null, $button->makeButton('submit', 'submitAttribs', 'Save',
null), null)
.$form->end();

[/code]

On Sat, May 22, 2010 at 12:28 PM, John Andersen wrote:

> Could you post the view code, I haven't seen your presentation of that
> in the thread!
> Enjoy,
>   John
>
> On May 22, 7:24 pm, Ed Propsner  wrote:
> > I tried to rename the model and everything associated with it and that
> > didn't work.
> >
> > I scrapped the model, controller, views, table ... everything. I started
> all
> > over again with it (I let the console create everything) and still have
> the
> > same problem.
> >
> > Everything happens (or don't happen) for a reason and I must be missing
> > something somewhere that's causing this ... feels like a really messed up
> > game of Where's Waldo 8-)
> >
> > Anyhow, as much I hate to and really shouldn't have to, I'm going to
> concede
> > and manually pull the errors out of the array for the sake of progress
> and
> > my own sanity.
> >
> > If anyone has any other ideas I'm all ears.
> >
> > - Ed
> >
> >
> >
> > On Sat, May 22, 2010 at 11:29 AM, Ed Propsner 
> wrote:
> > > @Matteo,
> >
> > > I've looked through all the materials and I did try a few things but it
> > > still don't work.
> >
> > > I'm actually going to trash the model and everything associated with it
> and
> > > start over and see what I get then.
> >
> > > It's an extreme solution but I've tried everything I could think of to
> no
> > > avail. It makes little sense.
> >
> > > On Sat, May 22, 2010 at 10:14 AM, Matteo  wrote:
> >
> > >> Hi,
> >
> > >> you could try this:
> >
> > >>http://cakeqs.org/eng/questions/view/validation_summary
> >
> > >> there are many posts about validation under cakephp questions, I would
> > >> check there too if you already didn't.
> >
> > >> Then lastly I would try changing model name and check if validation
> > >> behaves correctly.
> >
> > >> Hope it helps.
> >
> > >> Matteo
> >
> > >> On May 22, 10:22 am, Ed Propsner  wrote:
> > >> > @Master Ram
> >
> > >> > I appreciate the advice but doesn't this seem a bit long winded for
> > >> > something that normally requires no code at all besides the
> validation
> > >> rules
> > >> > in the model?
> >
> > >> >  if ($form->isFieldError('Model_name.Field_name')){
> >
> > >> > e($form->error('Model_name.Field_name',
> > >> > null,
> > >> > array(
> > >> >     'class' => 'failure')
> > >> >   ));
> > >> > }
> >
> > >> > What if you have a form with say 20 fields that need to be
> validated?
> >
> > >> > There is reason the validation errors are not outputting to the
> page,
> > >> > instead of a work around I'd be more interested in finding the cause
> to
> > >> the
> > >> > problem.
> >
> > >> > @Matteo,
> >
> > >> > Thanks, I looked it over but nothing seemed to apply.
> >
> > >> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> > >> > > Hi,
> >
> > >> > > you can check my post here and see if it - maybe - fits your
> needs.
> > >> > > Please, see last reply.
> >
> > >> > >
> http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d.
> > >> ..
> >
> > >> > > Matteo
> >
> > >> > > On May 22, 8:50 am, Ed Propsner  wrote:
> > >> > > > I have a form that is not displaying validation errors like it
> > >> should be.
> > >> > > > The

Re: Validation errors

2010-05-22 Thread John Andersen
Could you post the view code, I haven't seen your presentation of that
in the thread!
Enjoy,
   John

On May 22, 7:24 pm, Ed Propsner  wrote:
> I tried to rename the model and everything associated with it and that
> didn't work.
>
> I scrapped the model, controller, views, table ... everything. I started all
> over again with it (I let the console create everything) and still have the
> same problem.
>
> Everything happens (or don't happen) for a reason and I must be missing
> something somewhere that's causing this ... feels like a really messed up
> game of Where's Waldo 8-)
>
> Anyhow, as much I hate to and really shouldn't have to, I'm going to concede
> and manually pull the errors out of the array for the sake of progress and
> my own sanity.
>
> If anyone has any other ideas I'm all ears.
>
> - Ed
>
>
>
> On Sat, May 22, 2010 at 11:29 AM, Ed Propsner  wrote:
> > @Matteo,
>
> > I've looked through all the materials and I did try a few things but it
> > still don't work.
>
> > I'm actually going to trash the model and everything associated with it and
> > start over and see what I get then.
>
> > It's an extreme solution but I've tried everything I could think of to no
> > avail. It makes little sense.
>
> > On Sat, May 22, 2010 at 10:14 AM, Matteo  wrote:
>
> >> Hi,
>
> >> you could try this:
>
> >>http://cakeqs.org/eng/questions/view/validation_summary
>
> >> there are many posts about validation under cakephp questions, I would
> >> check there too if you already didn't.
>
> >> Then lastly I would try changing model name and check if validation
> >> behaves correctly.
>
> >> Hope it helps.
>
> >> Matteo
>
> >> On May 22, 10:22 am, Ed Propsner  wrote:
> >> > @Master Ram
>
> >> > I appreciate the advice but doesn't this seem a bit long winded for
> >> > something that normally requires no code at all besides the validation
> >> rules
> >> > in the model?
>
> >> >  if ($form->isFieldError('Model_name.Field_name')){
>
> >> >             e($form->error('Model_name.Field_name',
> >> >                             null,
> >> >                             array(
> >> >                             'class' => 'failure')
> >> >                           ));
> >> >         }
>
> >> > What if you have a form with say 20 fields that need to be validated?
>
> >> > There is reason the validation errors are not outputting to the page,
> >> > instead of a work around I'd be more interested in finding the cause to
> >> the
> >> > problem.
>
> >> > @Matteo,
>
> >> > Thanks, I looked it over but nothing seemed to apply.
>
> >> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> >> > > Hi,
>
> >> > > you can check my post here and see if it - maybe - fits your needs.
> >> > > Please, see last reply.
>
> >> > >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d.
> >> ..
>
> >> > > Matteo
>
> >> > > On May 22, 8:50 am, Ed Propsner  wrote:
> >> > > > I have a form that is not displaying validation errors like it
> >> should be.
> >> > > > The errors are there in the validationErrors array so the model is
> >> > > > validating, I'm sure of that.
> >> > > > I've been reading through a few other threads on the same subject
> >> but
> >> > > none
> >> > > > of the causes seem to apply.
>
> >> > > > I have the controller and the model stripped down to next to
> >> nothing.
>
> >> > > > [controller]
>
> >> > > > function add()
> >> > > > {
> >> > > > if(!empty($this->data))
> >> > > > {
> >> > > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> >> > > > $this->ProfileAttrib->save($this->data);
>
> >> > > > }
> >> > > > }
>
> >> > > > [/controller]
>
> >> > > > Then in the model I validate field 'gender'
>
> >> > > > [model]
>
> >> > > > class ProfileAttrib extends AppModel
> >> >

Re: Validation errors

2010-05-22 Thread Ed Propsner
I tried to rename the model and everything associated with it and that
didn't work.

I scrapped the model, controller, views, table ... everything. I started all
over again with it (I let the console create everything) and still have the
same problem.

Everything happens (or don't happen) for a reason and I must be missing
something somewhere that's causing this ... feels like a really messed up
game of Where's Waldo 8-)

Anyhow, as much I hate to and really shouldn't have to, I'm going to concede
and manually pull the errors out of the array for the sake of progress and
my own sanity.

If anyone has any other ideas I'm all ears.

- Ed


On Sat, May 22, 2010 at 11:29 AM, Ed Propsner  wrote:

> @Matteo,
>
> I've looked through all the materials and I did try a few things but it
> still don't work.
>
> I'm actually going to trash the model and everything associated with it and
> start over and see what I get then.
>
> It's an extreme solution but I've tried everything I could think of to no
> avail. It makes little sense.
>
>
> On Sat, May 22, 2010 at 10:14 AM, Matteo  wrote:
>
>> Hi,
>>
>> you could try this:
>>
>> http://cakeqs.org/eng/questions/view/validation_summary
>>
>> there are many posts about validation under cakephp questions, I would
>> check there too if you already didn't.
>>
>> Then lastly I would try changing model name and check if validation
>> behaves correctly.
>>
>> Hope it helps.
>>
>> Matteo
>>
>> On May 22, 10:22 am, Ed Propsner  wrote:
>> > @Master Ram
>> >
>> > I appreciate the advice but doesn't this seem a bit long winded for
>> > something that normally requires no code at all besides the validation
>> rules
>> > in the model?
>> >
>> >  if ($form->isFieldError('Model_name.Field_name')){
>> >
>> > e($form->error('Model_name.Field_name',
>> > null,
>> > array(
>> > 'class' => 'failure')
>> >   ));
>> > }
>> >
>> > What if you have a form with say 20 fields that need to be validated?
>> >
>> > There is reason the validation errors are not outputting to the page,
>> > instead of a work around I'd be more interested in finding the cause to
>> the
>> > problem.
>> >
>> > @Matteo,
>> >
>> > Thanks, I looked it over but nothing seemed to apply.
>> >
>> >
>> >
>> >
>> >
>> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
>> > > Hi,
>> >
>> > > you can check my post here and see if it - maybe - fits your needs.
>> > > Please, see last reply.
>> >
>> > >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d.
>> ..
>> >
>> > > Matteo
>> >
>> > > On May 22, 8:50 am, Ed Propsner  wrote:
>> > > > I have a form that is not displaying validation errors like it
>> should be.
>> > > > The errors are there in the validationErrors array so the model is
>> > > > validating, I'm sure of that.
>> > > > I've been reading through a few other threads on the same subject
>> but
>> > > none
>> > > > of the causes seem to apply.
>> >
>> > > > I have the controller and the model stripped down to next to
>> nothing.
>> >
>> > > > [controller]
>> >
>> > > > function add()
>> > > > {
>> > > > if(!empty($this->data))
>> > > > {
>> > > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
>> > > > $this->ProfileAttrib->save($this->data);
>> >
>> > > > }
>> > > > }
>> >
>> > > > [/controller]
>> >
>> > > > Then in the model I validate field 'gender'
>> >
>> > > > [model]
>> >
>> > > > class ProfileAttrib extends AppModel
>> > > >  {
>> >
>> > > > var $name = 'ProfileAttrib';
>> >
>> > > >  var $validate = array(
>> > > >   'gender' => array(
>> > > > 'rule' => 'notEmpty',
>> > > > 'message&#x

Re: Validation errors

2010-05-22 Thread Ed Propsner
@Matteo,

I've looked through all the materials and I did try a few things but it
still don't work.

I'm actually going to trash the model and everything associated with it and
start over and see what I get then.

It's an extreme solution but I've tried everything I could think of to no
avail. It makes little sense.

On Sat, May 22, 2010 at 10:14 AM, Matteo  wrote:

> Hi,
>
> you could try this:
>
> http://cakeqs.org/eng/questions/view/validation_summary
>
> there are many posts about validation under cakephp questions, I would
> check there too if you already didn't.
>
> Then lastly I would try changing model name and check if validation
> behaves correctly.
>
> Hope it helps.
>
> Matteo
>
> On May 22, 10:22 am, Ed Propsner  wrote:
> > @Master Ram
> >
> > I appreciate the advice but doesn't this seem a bit long winded for
> > something that normally requires no code at all besides the validation
> rules
> > in the model?
> >
> >  if ($form->isFieldError('Model_name.Field_name')){
> >
> > e($form->error('Model_name.Field_name',
> > null,
> > array(
> >     'class' => 'failure')
> >   ));
> > }
> >
> > What if you have a form with say 20 fields that need to be validated?
> >
> > There is reason the validation errors are not outputting to the page,
> > instead of a work around I'd be more interested in finding the cause to
> the
> > problem.
> >
> > @Matteo,
> >
> > Thanks, I looked it over but nothing seemed to apply.
> >
> >
> >
> >
> >
> > On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> > > Hi,
> >
> > > you can check my post here and see if it - maybe - fits your needs.
> > > Please, see last reply.
> >
> > >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d.
> ..
> >
> > > Matteo
> >
> > > On May 22, 8:50 am, Ed Propsner  wrote:
> > > > I have a form that is not displaying validation errors like it should
> be.
> > > > The errors are there in the validationErrors array so the model is
> > > > validating, I'm sure of that.
> > > > I've been reading through a few other threads on the same subject but
> > > none
> > > > of the causes seem to apply.
> >
> > > > I have the controller and the model stripped down to next to nothing.
> >
> > > > [controller]
> >
> > > > function add()
> > > > {
> > > > if(!empty($this->data))
> > > > {
> > > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> > > > $this->ProfileAttrib->save($this->data);
> >
> > > > }
> > > > }
> >
> > > > [/controller]
> >
> > > > Then in the model I validate field 'gender'
> >
> > > > [model]
> >
> > > > class ProfileAttrib extends AppModel
> > > >  {
> >
> > > > var $name = 'ProfileAttrib';
> >
> > > >  var $validate = array(
> > > >   'gender' => array(
> > > > 'rule' => 'notEmpty',
> > > > 'message' => 'Message here'
> > > > )
> > > >  );
> >
> > > > }
> >
> > > > [/model]
> >
> > > > I also stripped down the view to just a form and a single field for
> > > gender.
> > > > Whatever the reason is that validation messages aren't displaying I'm
> > > really
> > > > not seeing it.
> > > > I can't strip things down any more than what they are now.
> >
> > > > Any advice?
> >
> > > > - Ed
> >
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
> 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 athttp://
> > > groups.google.com/group/cake

Re: Validation errors

2010-05-22 Thread Matteo
Hi,

you could try this:

http://cakeqs.org/eng/questions/view/validation_summary

there are many posts about validation under cakephp questions, I would
check there too if you already didn't.

Then lastly I would try changing model name and check if validation
behaves correctly.

Hope it helps.

Matteo

On May 22, 10:22 am, Ed Propsner  wrote:
> @Master Ram
>
> I appreciate the advice but doesn't this seem a bit long winded for
> something that normally requires no code at all besides the validation rules
> in the model?
>
>  if ($form->isFieldError('Model_name.Field_name')){
>
>             e($form->error('Model_name.Field_name',
>                             null,
>                             array(
>                             'class' => 'failure')
>                           ));
>         }
>
> What if you have a form with say 20 fields that need to be validated?
>
> There is reason the validation errors are not outputting to the page,
> instead of a work around I'd be more interested in finding the cause to the
> problem.
>
> @Matteo,
>
> Thanks, I looked it over but nothing seemed to apply.
>
>
>
>
>
> On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:
> > Hi,
>
> > you can check my post here and see if it - maybe - fits your needs.
> > Please, see last reply.
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d...
>
> > Matteo
>
> > On May 22, 8:50 am, Ed Propsner  wrote:
> > > I have a form that is not displaying validation errors like it should be.
> > > The errors are there in the validationErrors array so the model is
> > > validating, I'm sure of that.
> > > I've been reading through a few other threads on the same subject but
> > none
> > > of the causes seem to apply.
>
> > > I have the controller and the model stripped down to next to nothing.
>
> > > [controller]
>
> > > function add()
> > > {
> > > if(!empty($this->data))
> > > {
> > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> > > $this->ProfileAttrib->save($this->data);
>
> > > }
> > > }
>
> > > [/controller]
>
> > > Then in the model I validate field 'gender'
>
> > > [model]
>
> > > class ProfileAttrib extends AppModel
> > >  {
>
> > > var $name = 'ProfileAttrib';
>
> > >  var $validate = array(
> > >       'gender' => array(
> > > 'rule' => 'notEmpty',
> > > 'message' => 'Message here'
> > > )
> > >      );
>
> > > }
>
> > > [/model]
>
> > > I also stripped down the view to just a form and a single field for
> > gender.
> > > Whatever the reason is that validation messages aren't displaying I'm
> > really
> > > not seeing it.
> > > I can't strip things down any more than what they are now.
>
> > > Any advice?
>
> > > - Ed
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp 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 > >  om>For more options, visit this group athttp://
> > groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
> athttp://groups.google.com/group/cake-php?hl=en

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


Re: Validation errors

2010-05-22 Thread Ed Propsner
@Master Ram

I appreciate the advice but doesn't this seem a bit long winded for
something that normally requires no code at all besides the validation rules
in the model?

 if ($form->isFieldError('Model_name.Field_name')){

e($form->error('Model_name.Field_name',
null,
array(
'class' => 'failure')
  ));
}

What if you have a form with say 20 fields that need to be validated?

There is reason the validation errors are not outputting to the page,
instead of a work around I'd be more interested in finding the cause to the
problem.

@Matteo,

Thanks, I looked it over but nothing seemed to apply.

On Sat, May 22, 2010 at 4:04 AM, Matteo  wrote:

> Hi,
>
> you can check my post here and see if it - maybe - fits your needs.
> Please, see last reply.
>
>
> http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264df0492006
>
> Matteo
>
> On May 22, 8:50 am, Ed Propsner  wrote:
> > I have a form that is not displaying validation errors like it should be.
> > The errors are there in the validationErrors array so the model is
> > validating, I'm sure of that.
> > I've been reading through a few other threads on the same subject but
> none
> > of the causes seem to apply.
> >
> > I have the controller and the model stripped down to next to nothing.
> >
> > [controller]
> >
> > function add()
> > {
> > if(!empty($this->data))
> > {
> > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> > $this->ProfileAttrib->save($this->data);
> >
> > }
> > }
> >
> > [/controller]
> >
> > Then in the model I validate field 'gender'
> >
> > [model]
> >
> > class ProfileAttrib extends AppModel
> >  {
> >
> > var $name = 'ProfileAttrib';
> >
> >  var $validate = array(
> >   'gender' => array(
> > 'rule' => 'notEmpty',
> > 'message' => 'Message here'
> > )
> >  );
> >
> > }
> >
> > [/model]
> >
> > I also stripped down the view to just a form and a single field for
> gender.
> > Whatever the reason is that validation messages aren't displaying I'm
> really
> > not seeing it.
> > I can't strip things down any more than what they are now.
> >
> > Any advice?
> >
> > - Ed
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Re: Validation errors

2010-05-22 Thread Matteo
Hi,

you can check my post here and see if it - maybe - fits your needs.
Please, see last reply.

http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264df0492006

Matteo

On May 22, 8:50 am, Ed Propsner  wrote:
> I have a form that is not displaying validation errors like it should be.
> The errors are there in the validationErrors array so the model is
> validating, I'm sure of that.
> I've been reading through a few other threads on the same subject but none
> of the causes seem to apply.
>
> I have the controller and the model stripped down to next to nothing.
>
> [controller]
>
> function add()
> {
> if(!empty($this->data))
> {
> $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
> $this->ProfileAttrib->save($this->data);
>
> }
> }
>
> [/controller]
>
> Then in the model I validate field 'gender'
>
> [model]
>
> class ProfileAttrib extends AppModel
>  {
>
> var $name = 'ProfileAttrib';
>
>  var $validate = array(
>       'gender' => array(
> 'rule' => 'notEmpty',
> 'message' => 'Message here'
> )
>      );
>
> }
>
> [/model]
>
> I also stripped down the view to just a form and a single field for gender.
> Whatever the reason is that validation messages aren't displaying I'm really
> not seeing it.
> I can't strip things down any more than what they are now.
>
> Any advice?
>
> - Ed
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 
> athttp://groups.google.com/group/cake-php?hl=en

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


Re: Validation errors

2010-05-22 Thread Master Ram...!
you can user cakephp validation here the example form cakephp validation.
in your model you can user this code.

var $validate = array(
'field_name' => array(
  'rule' => array(
'minLength',
1),
'required' => true,
'allowEmpty' => false,
'message' => 'Please enter a value
for the Name field'));

in the view you can user this code:

?php if ($form->isFieldError('Model_name.Field_name')){

e($form->error('Model_name.Field_name',
null,
array(
'class' => 'failure')
  ));
}
?>
try this i will work..









On Sat, May 22, 2010 at 12:20 PM, Ed Propsner  wrote:

> I have a form that is not displaying validation errors like it should be.
> The errors are there in the validationErrors array so the model is
> validating, I'm sure of that.
> I've been reading through a few other threads on the same subject but none
> of the causes seem to apply.
>
> I have the controller and the model stripped down to next to nothing.
>
> [controller]
>
> function add()
> {
>  if(!empty($this->data))
> {
> $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
>  $this->ProfileAttrib->save($this->data);
> }
> }
>
> [/controller]
>
> Then in the model I validate field 'gender'
>
> [model]
>
> class ProfileAttrib extends AppModel
>  {
>
> var $name = 'ProfileAttrib';
>
>  var $validate = array(
>   'gender' => array(
> 'rule' => 'notEmpty',
>  'message' => 'Message here'
> )
>  );
> }
>
> [/model]
>
> I also stripped down the view to just a form and a single field for
> gender.
> Whatever the reason is that validation messages aren't displaying I'm
> really not seeing it.
> I can't strip things down any more than what they are now.
>
> Any advice?
>
> - Ed
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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


Validation errors

2010-05-21 Thread Ed Propsner
I have a form that is not displaying validation errors like it should be.
The errors are there in the validationErrors array so the model is
validating, I'm sure of that.
I've been reading through a few other threads on the same subject but none
of the causes seem to apply.

I have the controller and the model stripped down to next to nothing.

[controller]

function add()
{
if(!empty($this->data))
{
$this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id');
$this->ProfileAttrib->save($this->data);
}
}

[/controller]

Then in the model I validate field 'gender'

[model]

class ProfileAttrib extends AppModel
 {

var $name = 'ProfileAttrib';

 var $validate = array(
  'gender' => array(
'rule' => 'notEmpty',
'message' => 'Message here'
)
 );
}

[/model]

I also stripped down the view to just a form and a single field for gender.
Whatever the reason is that validation messages aren't displaying I'm really
not seeing it.
I can't strip things down any more than what they are now.

Any advice?

- Ed

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


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
labels and divs can be disabled by passing "false" in the options
array
have a look in the manual


On 11 Mrz., 14:36, SeeVik  wrote:
> Thank you all for helping me out. I know how to customize $form-
>
> >input() to my liking now.
>
> Thanks for your help.
> ShiVik
>
> On Mar 11, 9:48 pm, nurvzy  wrote:
>
> > As Euromark suggested, you should be using $form->input().  You can
> > really customize how you want $form->input to return output now.  You
> > can turn labels off with $form->input('Model.field', array('label' =>
> > false));
>
> > If you insist on using those form helper elements you'll need to use
> > $form->error('Model.field') to output the error message.  Here is the
> > API for $form->error():
>
> >http://api.cakephp.org/class/form-helper#method-FormHelpererror
>
> > Hope that helps,
> > Nick
>
> > On Mar 11, 5:37 am, SeeVik  wrote:
>
> > > If I use $form->input() then I will also have to use the label for the
> > > input field it will display, which I don't want to, since I want my
> > > label in some specific CSS style.
>
> > > Can't the error message be displayed using $form->text() and other
> > > such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> > > in cakephp 1.2 it has been deprecated. So what's the new way of doing
> > > it?
>
> > > Thanks and Regards
> > > ShiVik
>
> > > On Mar 11, 8:32 pm, euromark  wrote:
>
> > > > always use $form->input()
> > > > this will make a lot for u automatically
>
> > > > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > > > Hello all
>
> > > > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > > > messages for the data validation of a form. I created the form like
> > > > > this
>
> > > > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > > > text( 'text' ); ?>
> > > > > text( 'value' ); ?>
> > > > > end( 'Submit' ); ?>
>
> > > > > In my model Post.php
>
> > > > > I have defined $validate like this
>
> > > > > $validate = array(
> > > > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > > needed' ),
> > > > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > > needed' )
> > > > > );
>
> > > > > In my PostsController.php I did the validation like this...
>
> > > > > function index() {
> > > > >  if( $this->data ) {
> > > > >    $this->Post->set( $this->data );
> > > > >    if( $this->Post->validates() ) {
> > > > >       // some action here
> > > > >    }
> > > > >    else {
> > > > >    // other action here
> > > > >    }
> > > > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > > > So when I see the variable "check" in my view, I can see the messages
> > > > > I defined in my model. But I cannot see the error message below my
> > > > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > > > Thanks and Regards
> > > > > ShiVik

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


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
Thank you all for helping me out. I know how to customize $form-
>input() to my liking now.

Thanks for your help.
ShiVik

On Mar 11, 9:48 pm, nurvzy  wrote:
> As Euromark suggested, you should be using $form->input().  You can
> really customize how you want $form->input to return output now.  You
> can turn labels off with $form->input('Model.field', array('label' =>
> false));
>
> If you insist on using those form helper elements you'll need to use
> $form->error('Model.field') to output the error message.  Here is the
> API for $form->error():
>
> http://api.cakephp.org/class/form-helper#method-FormHelpererror
>
> Hope that helps,
> Nick
>
> On Mar 11, 5:37 am, SeeVik  wrote:
>
>
>
> > If I use $form->input() then I will also have to use the label for the
> > input field it will display, which I don't want to, since I want my
> > label in some specific CSS style.
>
> > Can't the error message be displayed using $form->text() and other
> > such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> > in cakephp 1.2 it has been deprecated. So what's the new way of doing
> > it?
>
> > Thanks and Regards
> > ShiVik
>
> > On Mar 11, 8:32 pm, euromark  wrote:
>
> > > always use $form->input()
> > > this will make a lot for u automatically
>
> > > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > > Hello all
>
> > > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > > messages for the data validation of a form. I created the form like
> > > > this
>
> > > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > > text( 'text' ); ?>
> > > > text( 'value' ); ?>
> > > > end( 'Submit' ); ?>
>
> > > > In my model Post.php
>
> > > > I have defined $validate like this
>
> > > > $validate = array(
> > > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > needed' ),
> > > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > needed' )
> > > > );
>
> > > > In my PostsController.php I did the validation like this...
>
> > > > function index() {
> > > >  if( $this->data ) {
> > > >    $this->Post->set( $this->data );
> > > >    if( $this->Post->validates() ) {
> > > >       // some action here
> > > >    }
> > > >    else {
> > > >    // other action here
> > > >    }
> > > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > > So when I see the variable "check" in my view, I can see the messages
> > > > I defined in my model. But I cannot see the error message below my
> > > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > > Thanks and Regards
> > > > ShiVik

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


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread nurvzy
As Euromark suggested, you should be using $form->input().  You can
really customize how you want $form->input to return output now.  You
can turn labels off with $form->input('Model.field', array('label' =>
false));

If you insist on using those form helper elements you'll need to use
$form->error('Model.field') to output the error message.  Here is the
API for $form->error():

http://api.cakephp.org/class/form-helper#method-FormHelpererror

Hope that helps,
Nick

On Mar 11, 5:37 am, SeeVik  wrote:
> If I use $form->input() then I will also have to use the label for the
> input field it will display, which I don't want to, since I want my
> label in some specific CSS style.
>
> Can't the error message be displayed using $form->text() and other
> such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> in cakephp 1.2 it has been deprecated. So what's the new way of doing
> it?
>
> Thanks and Regards
> ShiVik
>
> On Mar 11, 8:32 pm, euromark  wrote:
>
>
>
> > always use $form->input()
> > this will make a lot for u automatically
>
> > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > Hello all
>
> > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > messages for the data validation of a form. I created the form like
> > > this
>
> > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > text( 'text' ); ?>
> > > text( 'value' ); ?>
> > > end( 'Submit' ); ?>
>
> > > In my model Post.php
>
> > > I have defined $validate like this
>
> > > $validate = array(
> > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > needed' ),
> > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > needed' )
> > > );
>
> > > In my PostsController.php I did the validation like this...
>
> > > function index() {
> > >  if( $this->data ) {
> > >    $this->Post->set( $this->data );
> > >    if( $this->Post->validates() ) {
> > >       // some action here
> > >    }
> > >    else {
> > >    // other action here
> > >    }
> > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > So when I see the variable "check" in my view, I can see the messages
> > > I defined in my model. But I cannot see the error message below my
> > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > Thanks and Regards
> > > ShiVik

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


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
If I use $form->input() then I will also have to use the label for the
input field it will display, which I don't want to, since I want my
label in some specific CSS style.

Can't the error message be displayed using $form->text() and other
such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
in cakephp 1.2 it has been deprecated. So what's the new way of doing
it?

Thanks and Regards
ShiVik

On Mar 11, 8:32 pm, euromark  wrote:
> always use $form->input()
> this will make a lot for u automatically
>
> On 11 Mrz., 11:19, SeeVik  wrote:
>
>
>
> > Hello all
>
> > I am using cakephp 1.2 and I am having problem in displaying the error
> > messages for the data validation of a form. I created the form like
> > this
>
> > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > text( 'text' ); ?>
> > text( 'value' ); ?>
> > end( 'Submit' ); ?>
>
> > In my model Post.php
>
> > I have defined $validate like this
>
> > $validate = array(
> >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > needed' ),
> >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > needed' )
> > );
>
> > In my PostsController.php I did the validation like this...
>
> > function index() {
> >  if( $this->data ) {
> >    $this->Post->set( $this->data );
> >    if( $this->Post->validates() ) {
> >       // some action here
> >    }
> >    else {
> >    // other action here
> >    }
> >    $this->set( 'check', $this->Post->validationErrors );
>
> > So when I see the variable "check" in my view, I can see the messages
> > I defined in my model. But I cannot see the error message below my
> > text fields in the view. Why is that? What am I doing wrong over here?
>
> > Thanks and Regards
> > ShiVik

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


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
always use $form->input()
this will make a lot for u automatically


On 11 Mrz., 11:19, SeeVik  wrote:
> Hello all
>
> I am using cakephp 1.2 and I am having problem in displaying the error
> messages for the data validation of a form. I created the form like
> this
>
> create( 'Posts', array( 'action' => 'index' ) ); ?>
> text( 'text' ); ?>
> text( 'value' ); ?>
> end( 'Submit' ); ?>
>
> In my model Post.php
>
> I have defined $validate like this
>
> $validate = array(
>  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> needed' ),
>  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> needed' )
> );
>
> In my PostsController.php I did the validation like this...
>
> function index() {
>  if( $this->data ) {
>    $this->Post->set( $this->data );
>    if( $this->Post->validates() ) {
>       // some action here
>    }
>    else {
>    // other action here
>    }
>    $this->set( 'check', $this->Post->validationErrors );
>
> So when I see the variable "check" in my view, I can see the messages
> I defined in my model. But I cannot see the error message below my
> text fields in the view. Why is that? What am I doing wrong over here?
>
> Thanks and Regards
> ShiVik

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


Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
Hello all

I am using cakephp 1.2 and I am having problem in displaying the error
messages for the data validation of a form. I created the form like
this

create( 'Posts', array( 'action' => 'index' ) ); ?>
text( 'text' ); ?>
text( 'value' ); ?>
end( 'Submit' ); ?>

In my model Post.php

I have defined $validate like this

$validate = array(
 'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
needed' ),
 'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
needed' )
);

In my PostsController.php I did the validation like this...


function index() {
 if( $this->data ) {
   $this->Post->set( $this->data );
   if( $this->Post->validates() ) {
  // some action here
   }
   else {
   // other action here
   }
   $this->set( 'check', $this->Post->validationErrors );

So when I see the variable "check" in my view, I can see the messages
I defined in my model. But I cannot see the error message below my
text fields in the view. Why is that? What am I doing wrong over here?

Thanks and Regards
ShiVik

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 do you show validation errors in multi-model form?

2009-11-23 Thread Ernesto
Hello.

i have a form like this one:

echo $form->create("Order");
echo $form->input("code")
for($i=0,$i<10,$i++) {
 echo $form->input("Item.$i.code");
 echo $form->input("Item.$i.quantity");
}

how do you show errors if more than 1 row fails validation?

div @ the end of the form?

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-...@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=.




Re: How to retrieve validation errors on model save?

2009-10-31 Thread j0n4s.h4rtm...@googlemail.com

If you are correctly validating within the model, add this to your
app_model.php file:
function validates($options = array()) {
// Debug validation
$errors = $this->invalidFields($options);
if (is_array($errors) && !empty($errors)) {
$this->log($errors, 'debug');
}
// Validate
return parent::validates($options);
}

Afterwards check /app/logs/debug.log for validation errors that might
have occured after you trigger a validation (or save)

On Oct 29, 10:08 pm, Will Poillion  wrote:
> Simple question:
>
> I'm attempting to save a model, and the data to be saved is not
> passing the validation rules. How do I retrieve the validation error?
>
> if ($this->Ingredient->IngredientImage->save($this->data)) {
>         //success
> $this->Session->setFlash(__('The Ingredient Image has been saved',
> true));} else {
>
>         // retrieve validation error and return to view
>
> }
>
> Also, am I correct in assuming that setFlash is useless in an ajax
> call? I know I'm a noob but I'm not sure how I would use the setflash
> and flash functionality in an ajax call. Any clue as to how to do this
> would be most appreciated.
>
> Thanks!
> Will
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: How to retrieve validation errors on model save?

2009-10-30 Thread robustsolution

Dear will,
it seems you are validating from the controller
http://book.cakephp.org/view/410/Validating-Data-from-the-Controller


On Oct 29, 9:08 pm, Will Poillion  wrote:
> Simple question:
>
> I'm attempting to save a model, and the data to be saved is not
> passing the validation rules. How do I retrieve the validation error?
>
> if ($this->Ingredient->IngredientImage->save($this->data)) {
>         //success
> $this->Session->setFlash(__('The Ingredient Image has been saved',
> true));} else {
>
>         // retrieve validation error and return to view
>
> }
>
> Also, am I correct in assuming that setFlash is useless in an ajax
> call? I know I'm a noob but I'm not sure how I would use the setflash
> and flash functionality in an ajax call. Any clue as to how to do this
> would be most appreciated.
>
> Thanks!
> Will
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: How to retrieve validation errors on model save?

2009-10-29 Thread Miles J

Yes setFlash doesnt work in AJAX. If you want to use true ajax, return
the success as a JSON response.


On Oct 29, 8:57 pm, Will Poillion  wrote:
> Simple question:
>
> I'm attempting to save a model, and the data to be saved is not
> passing the validation rules. How do I retrieve the validation error?
>
> if ($this->Ingredient->IngredientImage->save($this->data)) {
>         //success
> $this->Session->setFlash(__('The Ingredient Image has been saved',
> true));} else {
>
>         // retrieve validation error and return to view
>
> }
>
> Also, am I correct in assuming that setFlash is useless in an ajax
> call? I know I'm a noob but I'm not sure how I would use the setflash
> and flash functionality in an ajax call. Any clue as to how to do this
> would be most appreciated.
>
> Thanks!
> Will
--~--~-~--~~~---~--~~
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 retrieve validation errors on model save?

2009-10-29 Thread Will Poillion

Simple question:


I'm attempting to save a model, and the data to be saved is not
passing the validation rules. How do I retrieve the validation error?

if ($this->Ingredient->IngredientImage->save($this->data)) {
//success
$this->Session->setFlash(__('The Ingredient Image has been saved',
true));
} else {
// retrieve validation error and return to view
}


Also, am I correct in assuming that setFlash is useless in an ajax
call? I know I'm a noob but I'm not sure how I would use the setflash
and flash functionality in an ajax call. Any clue as to how to do this
would be most appreciated.


Thanks!
Will

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: How to retrieve validation errors on model save?

2009-10-29 Thread Miles J

Do not use invalidFields(), just use:

$this->Model->validationErrors;

invalidFields() causes your validation to run twice, which causes
problems in some cases.

On Oct 29, 5:50 pm, igotskils  wrote:
> On 29 Okt., 22:08, Will Poillion  wrote:
>
>
>
> > Simple question:
>
> > I'm attempting to save a model, and the data to be saved is not
> > passing the validation rules. How do I retrieve the validation error?
>
> > if ($this->Ingredient->IngredientImage->save($this->data)) {
> >         //success
> > $this->Session->setFlash(__('The Ingredient Image has been saved',
> > true));} else {
>
> >         // retrieve validation error and return to view
>
> > }
>
> > Also, am I correct in assuming that setFlash is useless in an ajax
> > call? I know I'm a noob but I'm not sure how I would use the setflash
> > and flash functionality in an ajax call. Any clue as to how to do this
> > would be most appreciated.
>
> > Thanks!
> > Will
>
> ajax? don't no what you mean with that here but i would try:
>
> $this-set('validtionErrors',$this->Ingredient->IngredientImage-
>
> >invalidFields());
>
> (dont forget the search function of the cookbook ;) )
>
> matic
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: How to retrieve validation errors on model save?

2009-10-29 Thread igotskils



On 29 Okt., 22:08, Will Poillion  wrote:
> Simple question:
>
> I'm attempting to save a model, and the data to be saved is not
> passing the validation rules. How do I retrieve the validation error?
>
> if ($this->Ingredient->IngredientImage->save($this->data)) {
>         //success
> $this->Session->setFlash(__('The Ingredient Image has been saved',
> true));} else {
>
>         // retrieve validation error and return to view
>
> }
>
> Also, am I correct in assuming that setFlash is useless in an ajax
> call? I know I'm a noob but I'm not sure how I would use the setflash
> and flash functionality in an ajax call. Any clue as to how to do this
> would be most appreciated.
>
> Thanks!
> Will

ajax? don't no what you mean with that here but i would try:

$this-set('validtionErrors',$this->Ingredient->IngredientImage-
>invalidFields());

(dont forget the search function of the cookbook ;) )

matic
--~--~-~--~~~---~--~~
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 retrieve validation errors on model save?

2009-10-29 Thread Will Poillion

Simple question:


I'm attempting to save a model, and the data to be saved is not
passing the validation rules. How do I retrieve the validation error?

if ($this->Ingredient->IngredientImage->save($this->data)) {
//success
$this->Session->setFlash(__('The Ingredient Image has been saved',
true));
} else {
// retrieve validation error and return to view
}


Also, am I correct in assuming that setFlash is useless in an ajax
call? I know I'm a noob but I'm not sure how I would use the setflash
and flash functionality in an ajax call. Any clue as to how to do this
would be most appreciated.


Thanks!
Will

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Amit Rawat
can you please tell me what validation rules are you applying?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Sarah

Okay, I was able to reproduce the error.  So I had a checkbox (I also
had select list), that I set at the bottom of my controller using the
following--rather convoluted--code:
 $active = $this->User->read('active', $id);

   $active = $active['User']['active'];
   if ($active == 1) {
   $active = true;
   }
   $this->set('active', $active);

(User::active is a 1 or 0)
I then used $active in the view like so:

   echo $form->input('active', array('checked'=>$active));

(I replaced this code using the active data from the $this->data read,
which actually simplified my code in both the controller and the view)

I'm not sure what it is exactly about this code that breaks the
validation errors.  My guess is that since those variables are set and
used upon every load, the validation errors are not told to display
because it thinks that it is simply reloading (even though it is not),
as if you had re-viewed the page.  However, I also use (and kept) two
other variables that I use to create the lists for my select.  I'm not
that experienced with CakePHP, so I can't explain why what I did
works, but perhaps this will give you a start to fixing your problem.
Perhaps someone more experienced will be kind enough to share their
wisdom.

Good luck and let me know if you need me to better explain myself.

Thanks,
~Sarah


On Sep 18, 4:00 pm, Sarah  wrote:
> Nevermind, it is now working.
>
> Thanks for your help!
>
> On Sep 18, 12:49 pm, Sarah  wrote:
>
> > I'm not sure I understand what you mean.  I do not use an element for
> > the form.  I am unaware of any name for a form; I only create the form
> > with the model name.  I would appreciate it if would explain what you
> > are referring to.
>
> > Thanks,
> > ~Sarah
>
> > On Sep 18, 5:08 am, Amit Rawat  wrote:
>
> > > Check your edit view. Your form element name must be different in edit 
> > > view
> > > as compared to add view.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Sarah

Nevermind, it is now working.

Thanks for your help!

On Sep 18, 12:49 pm, Sarah  wrote:
> I'm not sure I understand what you mean.  I do not use an element for
> the form.  I am unaware of any name for a form; I only create the form
> with the model name.  I would appreciate it if would explain what you
> are referring to.
>
> Thanks,
> ~Sarah
>
> On Sep 18, 5:08 am, Amit Rawat  wrote:
>
> > Check your edit view. Your form element name must be different in edit view
> > as compared to add view.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Sarah

I'm not sure I understand what you mean.  I do not use an element for
the form.  I am unaware of any name for a form; I only create the form
with the model name.  I would appreciate it if would explain what you
are referring to.

Thanks,
~Sarah

On Sep 18, 5:08 am, Amit Rawat  wrote:
> Check your edit view. Your form element name must be different in edit view
> as compared to add view.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Amit Rawat
Check your edit view. Your form element name must be different in edit view
as compared to add view.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-18 Thread Bert Van den Brande
When data from a form is posted to the controller the code for
if (empty($this->data))
should not be executed, as $this->data will not be empty.

So I don't understand why this code can interfere with the save()
validation.

On Fri, Sep 18, 2009 at 8:20 AM, Sarah  wrote:

>
> I realized one of the issues, but am still not sure how to solve it.
> I use Model's read method to retrieve the data for the edit, however
> this stops the validation.
>  if (empty($this->data)) {
>$this->data = $this->User->read(array
> ('username', 'firstname', 'lastname', 'email', 'animal_id'), $id);
>}
>
> I created a variable to try to limit the loading of data from the
> database into the form, to allow the validations to occur.
> Unfortunately, although this did control when the if statement
> executed, the validations did not appear.
>
> Segments of my code:
> up top I have var $failSave = false;
>
>  function admin_edit($id = hnull) {
>if (!$id && empty($this->data)) {
>$this->flash(__('Invalid User', true), array
> ('action'=>'index'));
>}
>
>//if form submitted
>if (!empty($this->data)) {
>
>//if password changed
>//if passwords match
>//include password in list of fields
> to be saved
>$fieldList = ...
>$match = true;
>}
>else {
>$this->flash(__('Passwords do not
> match', true), array('action'=>'index'));
>$match = false;
>}
>}
>//if password not changed, do not include password
> in list of fields to be saved
>else {
>$fieldList = ...
>$match = true;
>}
>
>if ($match && $this->User->save($this->data, true,
> $fieldList)) {
> $this->flash(__('The User has been saved.',
> true), array('action'=>'index'));
> $this->failSave = false;
>} else {
>$this->data['User']['password'] = '';
>$this->data['User']['password'] = '';
>$this->failSave = true;
>}
>
>}
>//load form
>if (!$this->failSave && empty($this->data)) {
>debug($this->failSave);
>$this->data = $this->User->read(array
> ('username', 'firstname', 'lastname', 'email', 'animal_id'), $id);
>}
>
>
> I would appreciate any advice.
>
> Thanks,
> ~Sarah
>
>
> On Sep 17, 10:27 pm, Sarah  wrote:
> > I am not redirecting after an unsuccessful state, I only reset two of
> > the fields to empty strings.  The url is the same.
> >
> > Any ideas?
> >
> > Thanks,
> > ~Sarah
> >
> > On Sep 17, 8:29 pm, "Dr. Loboto"  wrote:
> >
> > > Don't do redirect after unsuccessful save, be sure that form URL is
> > > same as your edit action. Presence of data in fields may indicate only
> > > browser forms cache.
> >
> > > On Sep 17, 11:30 am, Sarah  wrote:
> >
> > > > I've searched the forum, and I can't find any posts that correspond
> to
> > > > my question...unfortunately I haven't had much luck with the manual
> > > > either.
> >
> > > > I have user add and edit forms.  In my add form the proper validation
> > > > errors show as they supposed to.  However, in the edit form the
> errors
> > > > do not show (the page does not validate/save, the page reloads with
> > > > the data still stored in the form fields, but there are no errors
> > > > messages).
> >
> > > > Any idea why the errors show for one but not the other?
> >
> > > > Thanks in advance,
> > > > ~Sarah
> >
> > > > (I understand that you can use FormHelper options to override the
> > > > error message, but this isn't what I want.)
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Validation Errors Displaying on Add but not on Edit?

2009-09-17 Thread Sarah

I realized one of the issues, but am still not sure how to solve it.
I use Model's read method to retrieve the data for the edit, however
this stops the validation.
  if (empty($this->data)) {
$this->data = $this->User->read(array
('username', 'firstname', 'lastname', 'email', 'animal_id'), $id);
}

I created a variable to try to limit the loading of data from the
database into the form, to allow the validations to occur.
Unfortunately, although this did control when the if statement
executed, the validations did not appear.

Segments of my code:
up top I have var $failSave = false;

  function admin_edit($id = hnull) {
if (!$id && empty($this->data)) {
$this->flash(__('Invalid User', true), array
('action'=>'index'));
}

//if form submitted
if (!empty($this->data)) {

//if password changed
//if passwords match
//include password in list of fields
to be saved
$fieldList = ...
$match = true;
}
else {
$this->flash(__('Passwords do not
match', true), array('action'=>'index'));
$match = false;
}
}
//if password not changed, do not include password
in list of fields to be saved
else {
$fieldList = ...
$match = true;
}

if ($match && $this->User->save($this->data, true,
$fieldList)) {
 $this->flash(__('The User has been saved.',
true), array('action'=>'index'));
 $this->failSave = false;
} else {
$this->data['User']['password'] = '';
$this->data['User']['password'] = '';
$this->failSave = true;
}

}
//load form
if (!$this->failSave && empty($this->data)) {
debug($this->failSave);
$this->data = $this->User->read(array
('username', 'firstname', 'lastname', 'email', 'animal_id'), $id);
}


I would appreciate any advice.

Thanks,
~Sarah


On Sep 17, 10:27 pm, Sarah  wrote:
> I am not redirecting after an unsuccessful state, I only reset two of
> the fields to empty strings.  The url is the same.
>
> Any ideas?
>
> Thanks,
> ~Sarah
>
> On Sep 17, 8:29 pm, "Dr. Loboto"  wrote:
>
> > Don't do redirect after unsuccessful save, be sure that form URL is
> > same as your edit action. Presence of data in fields may indicate only
> > browser forms cache.
>
> > On Sep 17, 11:30 am, Sarah  wrote:
>
> > > I've searched the forum, and I can't find any posts that correspond to
> > > my question...unfortunately I haven't had much luck with the manual
> > > either.
>
> > > I have user add and edit forms.  In my add form the proper validation
> > > errors show as they supposed to.  However, in the edit form the errors
> > > do not show (the page does not validate/save, the page reloads with
> > > the data still stored in the form fields, but there are no errors
> > > messages).
>
> > > Any idea why the errors show for one but not the other?
>
> > > Thanks in advance,
> > > ~Sarah
>
> > > (I understand that you can use FormHelper options to override the
> > > error message, but this isn't what I want.)
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >