Skip to end of metadata
Go to start of metadata

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[]]></ac:plain-text-body></ac:macro>
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Under Construction
This proposal is under construction and is not ready for review.

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_Validate_DateBetween
Zend_Validate_DateGreaterThan Component Proposal

Proposed Component Name Zend_Validate_DateBetween
Developer Notes
Proposers Niek Slatius
Zend Liaison TBD
Revision 0.1 - 6 March 2009: Initial Draft. (wiki revision: 6)

Table of Contents

1. Overview

Zend_Validate currently does not have an easy means to compare date such that they can be easily used in form validation. This proposal strives to create such validators.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

4. Dependencies on Other Framework Components

  • Zend_Date
  • Zend_Validate_Exception
  • Zend_Validate_Abstract

5. Theory of Operation

The component will provide a means to add validators to form elements such that their values can be tested in comparison to some benchmark date.

6. Milestones / Tasks

  • Milestone 1: Requirement specifications
  • Milestone 2: Receive comments from the community about draft / suggestions from community for further improvements
  • Milestone 3: Create working prototype

7. Class Index

  • Zend_Validate_DateBetween
  • Zend_Validate_DateLessThan
  • Zend_Validate_DateGreaterThan

8. Use Cases

9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Mar 07, 2009

    <p>All classes are nearly related and should therefor be based on one abstract or default class.<br />
    Maybe all date content validators should be within one Validate_Date directory.</p>

    <p>Also string input should be accepted as input.<br />
    As you rely on Zend_Date there should be a way to set the wished locale, which is not always the system locale.</p>

  2. Oct 02, 2009

    <p>Here's my version of a date GreaterThan/LessThan validator.</p>

    <p><a href=""></a></p>

    <p>I took Thomas's recommendations of creating a base Date Validate class and also making the validator locale-aware.</p>

    <p>The thing different about my implementation is it allows you to specify a field name to lookup in the context argument of the isValid method. This allows you to compare against another date field when adding validators to form elements.</p>

    <p>Keep in mind, my example is working for my implementation and has not been thoroughly tested by any means. However, I wanted to share my approach on this validator as I think it would be a great addition to Zend Framework.</p>