I don't mind using URL like this but are you sure that validation will work 
like this?

Regards
Tapan Thapa 

Sent from my iPhone

On Feb 16, 2011, at 11:36 PM, euromark <[email protected]> wrote:

> you are mixing cake pretty urls and plain url style
> 
> why not going with
> /.../x:1/y:2/z:3
> and using
> $this->params[named]
> ?
> 
> if you don't mind my asking
> 
> 
> On 16 Feb., 12:49, Tapan Thapa <[email protected]> wrote:
>> Hello Community,
>> 
>> I want to create a url like this.
>> 
>> http://localhost/cakephp/incomings/request/?msisdn=919871701375&opera...
>> 
>> and i am accepting this request in my controller like below code and
>> passing it to model for validation but it is not working in case i
>> left any variable above blank like (circle=) or (msisdn=)
>> 
>> incomings_controller.php
>> 
>> <?php
>> class IncomingsController extends AppController {
>> var $name = 'Incomings';
>> function request() {
>> $this->Incoming->set($this->params['url']);
>> $this->Incoming->validates();}
>> }
>> 
>> ?>
>> 
>> incoming model:
>> 
>> <?php
>> class Incoming extends AppModel {
>> var $name = 'Incoming';
>> var $validate = array(
>> 'msisdn' => array(
>> 'rule' => 'notEmpty',
>> 'required' => true,
>> 'message' => 'Please enter a valid msisdn',
>> 'last' => true
>> ),
>> 'operator' => array(
>> 'rule' => 'notEmpty',
>> 'required' => true,
>> 'message' => 'Please enter a valid operator',
>> 'last' => true
>> ),
>> 'circle' => array(
>> 'rule' => 'notEmpty',
>> 'required' => true,
>> 'message' => 'Please enter a valid circle',
>> 'last' => true
>> )
>> );
>> 
>> }
>> 
>> ?>
>> 
>> Please suggest.
>> 
>> Regards
>> Tapan Thapa
>> India
>> [email protected]
> 
> -- 
> 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
> [email protected] 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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to