cvs: peardoc /en/package/validate/validate_be intro.xml validations.xml

From: Date: Tue, 08 Aug 2006 20:15:43 +0000
Subject: cvs: peardoc /en/package/validate/validate_be intro.xml validations.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8268@lists.php.net to get a copy of this message
moosh Tue Aug 8 20:15:43 2006 UTC Added files: /peardoc/en/package/validate/validate_be intro.xml validations.xml Log: - minimum content for each package

http://cvs.php.net/viewvc.cgi/peardoc/en/package/validate/validate_be/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_be/intro.xml +++ peardoc/en/package/validate/validate_be/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- $Id: intro.xml,v 1.1 2006/08/08 20:15:43 moosh Exp $ --> <!-- package-release: beta --> <refentry id="package.validate.validate_be.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>Introduction to validate_be</refpurpose> </refnamediv> <refsect1 id="package.validate.validate_be.intro.desc"> &title.desc; <para> The package propose some method to validate specific data for Belgium </para> <para> </para> </refsect1> <refsect1 id="package.validate.validate_be.intro.usage"> <title>Usage</title> <refsect2 id="package.validate.validate_be.intro.usage.general"> <title>General usage</title> <para> Every module of Validate follows the same philosophy. Propose some validation method retuning boolean result. Some methode have some optional parameter to set a stronger check. </para> </refsect2> <refsect2 id="package.validate.validate_be.intro.usage.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/BE.php'); ?> ]]> </programlisting> </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/viewvc.cgi/peardoc/en/package/validate/validate_be/validations.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_be/validations.xml +++ peardoc/en/package/validate/validate_be/validations.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- $Id: validations.xml,v 1.1 2006/08/08 20:15:43 moosh Exp $ --> <!-- package-release: beta --> <refentry id="package.validate.validate_be.validations"> <refnamediv> <refname>List of aivailable validations</refname> <refpurpose>aivailable validation in validate_be</refpurpose> </refnamediv> <refsect1 id="package.validate.validate_be.validations.nationalId"> <title>Validate a Belgian nationalId</title> <para> The belgian nationalId on the identity card of all belgian. </para> <para> A check digit is the last one, computed the standard _get_control_number function. </para> <refsect2 id="package.validate.validate_be.validations.nationalId.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/BE.php'); $badNationalId = '730111-361-99'; $result = Validate_BE::nationalId($badNationalId); echo 'Test ' . $badNationalId .' : <br />'; var_export($result); echo '<br /><br />'; $goodNationalId = '730111 361 73'; $result = Validate_BE::nationalId($goodNationalId); echo 'Test ' . $goodNationalId .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 730111-361-99 : false Test 730111 361 73 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_be.validations.ssn"> <title>Validate a Belgian social security number</title> <para> The belgian social security number is on the SIS card of all belgian. </para> <para> A check digit is the last one, computed the standard _get_control_number function. </para> <refsect2 id="package.validate.validate_be.validations.ssn.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/BE.php'); $badSsn = '72011136173'; $result = Validate_BE::ssn($badSsn); echo 'Test ' . $badSsn .' : <br />'; var_export($result); echo '<br /><br />'; $goodSsn = '73011136173'; $result = Validate_BE::ssn($goodSsn); echo 'Test ' . $goodSsn .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 72011136173 : false Test 73011136173 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_be.validations.postcode"> <title>Validate a Belgian postcode</title> <para>Belgian post code are 4 digit formed.</para> <para>First parameter is the post code to validate.</para> <para> An optional parameter for activate strong checks using a list of postcodes. </para> </refsect1> <refsect1 id="package.validate.validate_be.validations.bank.account"> <title>Validate a Belgian bank account number</title> <para> Belgian bankcodes consist of <itemizedlist> <listitem><simpara>3 figure number for the bank society</simpara></listitem> <listitem><simpara>7-figure number for the account number</simpara></listitem> <listitem><simpara>2-figure number for mod 97</simpara></listitem> </itemizedlist> </para> <refsect2 id="package.validate.validate_be.validations.bank.account.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/BE.php'); $badBankCode = '310164533227'; $result = Validate_BE::bankCode($badBankCode); echo 'Test ' . $badBankCode .' : <br />'; var_export($result); echo '<br /><br />'; $goodBankCode = '310164533207'; $result = Validate_BE::bankCode($goodBankCode); echo 'Test ' . $goodBankCode .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 310164533227 : false Test 310164533207 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_be.validations.bank.transfert"> <title>Validate a Belgian transfert message</title> <para> Belgian transfert (virement) can be done with a structured message 12 figures <itemizedlist> <listitem><simpara>10-figure number for the message</simpara></listitem> <listitem><simpara>2-figure number for mod 97</simpara></listitem> </itemizedlist> </para> <refsect2 id="package.validate.validate_be.validations.bank.transfert.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/BE.php'); $badBankTransferMessage = '053/3140/16211'; $result = Validate_BE::bankTransferMessage($badBankTransferMessage); echo 'Test ' . $badBankTransferMessage .' : <br />'; var_export($result); echo '<br /><br />'; $goodBankTransferMessage = '054/3140/16211'; $result = Validate_BE::bankTransferMessage($goodBankTransferMessage); echo 'Test ' . $goodBankTransferMessage .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 053/3140/16211 : false Test 054/3140/16211 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_be.validations.vat"> <title>Validate a VAT account number</title> <para>Belgian VAT consist of 3-figure number.</para> <para>Actually no doc was found about a checksum.</para> </refsect1> <refsect1 id="package.validate.validate_be.validations.phonenumber"> <title>Validate a phonenumber</title> <para> Validate a belgian phone number passed as first param second specify if it's would be a mobile or a traditional line or both. <quote>/</quote> (slash), <quote>-</quote> (dash), <quote>.</quote> (dot), and white spaces are ignored. <quote>+</quote> are use a exit code : 0 in Belgium. </para> <para> NOTE : this validate want a BELGIAN phonenumber to return true, not a valid number to call FROM belgium </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#8268) next »