Issues

ZF-7677: Zend_Validate_Date can not validate class (Zend_Date) instance

Issue Type: Bug Created: 2009-08-24T13:31:34.000+0000 Last Updated: 2009-08-24T13:34:48.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Michal Vrchota (techi) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: - ZF-7630

Attachments:

Description

I dont understand why isValid method should only accept primitive types (string, float, integer), therefore refuses to validate class instances, even if the class has __toString() method implemented. For example I want validate Zend_Date instance and have to pass $date->__toString() instead.

The only type which should not be accepted is array, but IMHO this type of parameter checking is useless and only confusing.

Comments

Posted by Thomas Weidner (thomas) on 2009-08-24T13:34:47.000+0000

Closed as duplicate

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts