Zend Framework: Zend_Validate_Ssn_Be Component Proposal
| Proposed Component Name | Zend_Validate_Ssn_Be |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Validate_Ssn_Be |
| Proposers | Andries Seutens |
| Revision | 1.0 - 4 February 2008: Updated from community comments. (wiki revision: 7) |
Table of Contents
1. Overview
Zend_Validate_Ssn_Be will validate the format of a Belgian ssn (SIS)
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
5. Theory of Operation
6. Milestones / Tasks
7. Class Index
8. Use Cases
9. Class Skeletons
Labels:
None
5 Comments
comments.show.hideFeb 04, 2008
Till Klampaeckel
Sounds like a good direction to give to Zend_Validate - though I cannot comment if this actually works since I am by no means familiar with the Belgium SSN.
Generally I'd put my vote on a Zend_Validate_Be with Driver/Adapter architecture to meet future extensions.
Jan 21, 2009
Thomas Weidner
Such a validator should not be limited to one country.
This would be no benefit for ZF, as there are 138 countries.
I would propose to generate a adapter based system.
A generic SSN class and one adapter for each supported country... BE, GB, DE, US, and so on...
Another thing... I would propose to rename this validator.
No one knows what SSN means.. it's no international known abbreviation.
Zend_Validate_SocialNumber for example. I think you have better ideas
Greetings
Thomas
Jan 22, 2009
fc
I'm not sure this is a good idea, unless you have the option to download this packages separately. To include validators for hostnames makes sense, because you might need to use them, regardless of your location. But adding validators for social numbers or post codes can increase the number of classes drastically and each package will only be used by a small percentage of users.
Jan 22, 2009
Thomas Weidner
It's not said that this proposal will be included into core.
It could also be that it's only accepted for extras.
And regarding number of classes.
It's also not said that this is problematic.
Because generally the difference between countries are how to write this number which means just another regex and how to calculate the CC. Normally this would be a 5-6 liner and not more.
When it's really possible he could also make a basic class without adapters and provide all known within this single class, as shown with the Iban valiator.
But again, the change is done by the author and no by us two. We can only make suggestions
In general, do you think that a validation of social numbers is only made by a small amount of users ? I think not, because I've seen such inputs very often when you have to provide personal data for example at government departments or big companies who do not provide credit card payments.
Jan 24, 2009
fc
> do you think that a validation of social numbers is only made by a small amount of users?
Well, unless you work for the IRS or a bank, yes
When it comes to privacy and providing personal data, a lot of people are concerned about giving away their SSN, as it is used in identity theft. You might need to provide it to to set up a bank account or apply for a credit card, but not to make an online purchase.
> And regarding number of classes. It's also not said that this is problematic.
The amount of things you can validate is huge. I suggest making a list of validators based on user needs and prioritize them.