Zend Framework

Zend_Validate_Date can not validate class (Zend_Date) instance

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.9.1
  • Fix Version/s: 1.10.0
  • Component/s: Zend_Validate
  • Labels:
    None

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.

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Closed as duplicate

Show
Thomas Weidner added a comment - Closed as duplicate

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: