Re: Validate UK postcode without a space in it

2009-09-07 Thread channel5
Thanks for the custom rule, I've used it and it seems to work well. Thanks again. c5 --~--~-~--~~~---~--~~ 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

Validate UK postcode without a space in it

2009-08-31 Thread channel5
Hi I've got a model that uses 'rule'=array('postal',null,'uk') to successfully validate UK postcodes. However testing has shown that many people enter their postcodes in forms without using the space, so: W1W 5QU -- validates W1W5QU -- does not validate Has anyone got any tips on getting

Joining two arrays to use in a Select box with the formhelper

2009-08-29 Thread channel5
Hi I have a select box that is populated by a database: $isps = $this-Consultation-Isp-find('list'); and then output using the form helper in the view: echo $form-select('isp_id', $isps, array('selected' = $ispselect), array(), 'select your supplier'); This

Re: Joining two arrays to use in a Select box with the formhelper

2009-08-27 Thread channel5
Thanks all for your help, worked a charm! Thanks again :) c5 --~--~-~--~~~---~--~~ 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

Contains and conditions gives rather unexpected results

2009-08-18 Thread channel5
Hi All I am working through examples of containable and applying conditions to the results. I have a basic blog example running, where Posts can have many comments. I'm trying to use contain with conditions so I can pick out only posts that have been commented on by a particular user. Here is