Req #15836 [Opn->WFx]: Add VALIDATE_ZIP_CODE and VALIDATE_PHONE

From: Date: Thu, 26 Feb 2009 08:52:39 +0000
Subject: Req #15836 [Opn->WFx]: Add VALIDATE_ZIP_CODE and VALIDATE_PHONE
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-76@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=15836&edit=1 ID: 15836 Updated by: amirsaied@gmail.com Reported By: rasmo2003 at hotmail dot com Summary: Add VALIDATE_ZIP_CODE and VALIDATE_PHONE -Status: Open +Status: Wont fix Type: Feature/Change Request Package: Validate Operating System: Windows Package Version: CVS PHP Version: 5.1.6 Roadmap Versions: New Comment: <div id="changeset"> <span class="removed">-Status: Open</span> <span class="added">+Status: Wont fix</span> </div> Validate has locales and submodules which validates such stuff, Validating Zip codes is not as easy as checking for numbers and hyphens. For example check Validate_FR which is a Validation class for France, and see they have methods to validate postal codes, or validate ISPN which validates International Standard Product Numbers and ... Previous Comments: ------------------------------------------------------------------------ [2009-01-31 22:19:59] doconnor I'd be hesitant to see that, its a pretty sweeping assertation. ------------------------------------------------------------------------ [2009-01-30 16:03:43] rasmo2003 Description: ------------ No matter locale, zip codes only have numbers and hyphens No matter the locale, phone numbers only have numbers, hyphens, spaces, parentheses, and pluses (international numbers). Both should be easy to implement basic validation in the Validator class. Test script: --------------- define('VALIDATE_ZIP_CODE', VALIDATE_NUM . "-"); define('VALIDATE_PHONE', VALIDATE_NUM . VALIDATE_SPACE . '\+\(\)' . "-"); ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=15836&edit=1

« previous php.pear.bugs (#76) next »