Zend Framework: Zend_Validate_PostCode Component Proposal
| Proposed Component Name | Zend_Validate_PostCode |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Validate_PostCode |
| Proposers | Thomas Weidner |
| Zend Liaison | TBD |
| Revision | 1.0 - 7 June 2009: Initial Draft. (wiki revision: 8) |
Table of Contents
1. Overview
Zend_Validate_PostCode is a compnent which will validate if a given string conforms a post code from any region within the world.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will support postal codes from all countries
- This component will only validate
- This component will not change the notation of the input
- This component will not 100% detect if a given postal code exists or not
4. Dependencies on Other Framework Components
- Zend_Exception
- Zend_Locale
5. Theory of Operation
This component uses Zend_Locale to get the postal code informations for all known countries. These are then used to detect if the given input is a postal code or not. This component can not detect if a given postal code exists or not. It only checks if a given input can be a postal code, if the notation conforms, or not.
6. Milestones / Tasks
- Milestone 1: [DONE] Proposal finished
- Milestone 2: [DONE] Proposal accepted
- Milestone 3: [DONE] Coding finished
- Milestone 4: [DONE] Unit tests finished
- Milestone 5: [DONE] Documentation finished
- Milestone 6: [DONE] Component moved to core
7. Class Index
- Zend_Validate_PostCode
8. Use Cases
| UC-01 |
|---|
Uses set application wide locale to detect the region to use
| UC-02 |
|---|
Sets a region where the postal code is related to
or set it afterwards
| UC-03 |
|---|
Sets a self defined format for postal code validation
5 Comments
comments.show.hideJul 14, 2009
Matthew Weier O'Phinney
This proposal is accepted for immediate development in the standard incubator, as-is.
Sep 08, 2009
Borislav Nedelchev
Do you need help for checking GB postcodes?
Sep 09, 2009
Thomas Weidner
No need to check. The component is already finished.
The data comes from unicode.
When it's not correct then we have to blame unicode
Sep 09, 2009
Borislav Nedelchev
Good, is there anything else I can help with?
Just tried to be in help
Sep 09, 2009
Thomas Weidner
As you can read within Point 6 of the proposal:
There is nothing to do as all work is already done.
We are just waiting for approvement from the dev-team.