ZF-11566: Error in "Standard Validation Classes: NotEmpty" documenation.

Description

Hello,

I was working with Zend_Validate_NotEmpty and was using the array notation to configure the class. I noticed the the documentation was incorrect on how to use the array method.

Currently, the the figure under the subheader "Changing behaviour for Zend_Validate_NotEmpty" says this:


// Returns false on 0 or '0'
$validator = new Zend_Validate_NotEmpty(array(
    Zend_Validate_NotEmpty::INTEGER,
    Zend_Validate_NotEmpty::ZERO
));
 
// Returns false on 0 or '0'
$validator = new Zend_Validate_NotEmpty(array(
    'integer',
    'zero',
));

It should be this:


// Returns false on 0 or '0'
$validator = new Zend_Validate_NotEmpty(array(
    'type' => array(
        Zend_Validate_NotEmpty::INTEGER,
        Zend_Validate_NotEmpty::ZERO
    )
));
 
// Returns false on 0 or '0'
$validator = new Zend_Validate_NotEmpty(array(
    'type' => array(
        'integer',
        'zero'
    )
));

Thanks.

Comments

Attached Patch

Thank you for this patch, but as you can see this issue is already in progress which means it is already been worked on.

You bet, Sorry about that. I just noticed it has been "In Progress" since the 28th of July. Didn't look like anyone was working on it. So I thought I'd knock it out real quick.

Fixed in ZF2 with GH-286