View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Validate_Postcode_Uk
{zone-data}

{zone-data:proposer-list}
[My Name|mailto:noreply@zend.com]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 1 January 2008: Initial Draft.
{zone-data}

{zone-data:overview}
Zend_Validate_Postcode_Uk is class that will validate UK postcodes. It can be used as a part of form element validation or used stand alon
{zone-data}

{zone-data:references}
* [Zend_Validate|http://framework.zend.com/manual/en/zend.validate.html]
{zone-data}

{zone-data:requirements}
Most requirements take the form of "foo will do ...." or "foo will not support ...", although different words and sentence structure might be used. Adding functionality to your proposal is requirements creep (bad), unless listed below. Discuss major changes with your team first, and then open a "feature improvement" issue against this component.

* This component *will* validate provided postcode as valid UK postcode
{zone-data}

{zone-data:dependencies}
* Zend_Validate
* Zend_Locale
{zone-data}

{zone-data:operation}
This validator has only one function to determine if provided postcode is valid UK postcode
{zone-data}

{zone-data:milestones}
Describe some intermediate state of this component in terms of design notes, additional material added to this page, and / code. Note any significant dependencies here, such as, "Milestone #3 can not be completed until feature Foo has been added to ZF component XYZ." Milestones will be required for acceptance of future proposals. They are not hard, and many times you will only need to think of the first three below.
* Milestone 1: \[DONE\][design notes will be published here|http://framework.zend.com/wiki/x/sg]
* Milestone 2: Working prototype checked into the incubator supporting use cases #1, #2, ...
* Milestone 3: Working prototype checked into the incubator supporting use cases #3 and #4.
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists.

If a milestone is already done, begin the description with "\[DONE\]", like this:
* Milestone #: \[DONE\] Unit tests ...
{zone-data}

{zone-data:class-list}
* Zend_Validate_Postcode_Uk
{zone-data}

{zone-data:use-cases}
||UC-01||
{code}
$validator = new Zend_Validate_Postcode_Uk();
$valid = $validator->isValid('HX6 4EW');
{code}
||UC-02||

{zone-data}

{zone-data:skeletons}
{code}
class Zend_Validate_Int extends Zend_Validate_Abstract
{
/**
* @param $value string postcode to be checked
* @return bool
*/
public function isValid($value)
{
}

}
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>