Validate

From PEAR Wiki

Jump to: navigation, search

[edit] Validate

The Validate packages are a collection of libraries to validate country specific data, such as phone numbers and postcodes.


[edit] New Packages

All Validate sub-packages must end up in PHP CVS, otherwise they won't get released.

New packages are exempt from PEPR, provided the developer is in contact with a Validate lead.


[edit] Creating a new Validate package

If you like to add Validate subpackages for a country or some specific (like Finance) needs, please send a mail to the pear-dev Mailing list to discuss it.

There is no need to create a proposal. There is no vote or other community requests to add a locale to validate.

We do not have many requirements, but the following must be fullfilled:

  • Validate API compliant
  • No conflict with existing sub packages
  • If possible more than one maintainer (asking other validate_xx maintainers help)
  • PEAR CS

Only the current active leads of Validate can agree or not to publish a subpackage (actually dufuz, davidc and amir).

If you need a starting point then take a look at Example_Locale.php in the docs dir (http://cvs.php.net/pear/Validate/docs/) You can take that file to have something to start from and also to have three functions to start implementing before doing your first release.

To make things even easier then you just go in there and replace [Your Name] with your real name <a href="mailto:example@example.org">example@example.org</a> with your email (but still keeping the <> around the email) and [LocaleName] should be replaced with your locale name, like say HU or IS or such.

Now you just have to implement those functions and write further info for each function where relevant (some countries have more requirements than others and the end developer has to know those things, URLs to those infos are also fine) and if you have any extra functions in mind then just go and implement those also! ;)

Personal tools