Error: Zend_Form - QuickStart

View: New views
3 Messages — Rating Filter:   Alert me  

Error: Zend_Form - QuickStart

by beberlei :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There is an error in the documentation of the Zend_Form - QuickStart - Adding Elements Section.

http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.elements

In the last example of the section it says:

$form->addElement('text', 'username', array(
    'validators' => array(
        array('regex', false, '/^[a-z]/i')

but it has to be:

array('regex', false, array('/^[a-z]/i'))


Re: Error: Zend_Form - QuickStart

by qry :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi beberlei,

I searched the whole page and there is only place is similar with what you said.
see below:
<?php
$form
->addElement('text''username', array(
    
'validators' => array(
        
'alnum',
        array(
'regex'false'/^[a-z]/i')
    ),
    
'required' => true,
    
'filters'  => array('StringToLower'),
));
?>

Do you mean, "),' need to move the the end of the previous line ?

However, to follow the code standard, it should be there as it is.

Jason.


beberlei <kontakt@...> wrote:

There is an error in the documentation of the Zend_Form - QuickStart - Adding
Elements Section.

http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.elements

In the last example of the section it says:

$form->addElement('text', 'username', array(
'validators' => array(
array('regex', false, '/^[a-z]/i')

but it has to be:

array('regex', false, array('/^[a-z]/i'))


--
View this message in context: http://www.nabble.com/Error%3A-Zend_Form---QuickStart-tp16922546p16922546.html
Sent from the Zend Doc mailing list archive at Nabble.com.



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Re: Error: Zend_Form - QuickStart

by Matthew Weier O'Phinney-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-- beberlei <kontakt@...> wrote
(on Sunday, 27 April 2008, 03:58 AM -0700):

> There is an error in the documentation of the Zend_Form - QuickStart - Adding
> Elements Section.
>
> http://framework.zend.com/manual/en/zend.form.quickstart.html#zend.form.quickstart.elements
>
> In the last example of the section it says:
>
> $form->addElement('text', 'username', array(
>     'validators' => array(
>         array('regex', false, '/^[a-z]/i')
>
> but it has to be:
>
> array('regex', false, array('/^[a-z]/i'))

Please place an issue in the tracker for this.

Thanks!

--
Matthew Weier O'Phinney
Software Architect       | matthew@...
Zend - The PHP Company   | http://www.zend.com/
LightInTheBox - Buy quality products at wholesale price