Labels
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
9. Class Skeletons
Do you need help for checking GB postcodes?
ZF Home Page
Code Browser
Wiki Dashboard
This proposal is accepted for immediate development in the standard incubator, as-is.