cvs: peardoc /en/package/validate validate_au.xml /en/package/validate/validate_au constants.xml intro.xml validations.xml
/en/package/validate/validate_au/validate_au abn.xml acn.xml phonenumber.xml postalcode.xml region.xml ssn.xml tfn.xml

From: Date: Tue, 29 Aug 2006 08:01:38 +0000
Subject: cvs: peardoc /en/package/validate validate_au.xml /en/package/validate/validate_au constants.xml intro.xml validations.xml
/en/package/validate/validate_au/validate_au abn.xml acn.xml phonenumber.xml postalcode.xml region.xml ssn.xml tfn.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-8382@lists.php.net to get a copy of this message
ahayes Tue Aug 29 08:01:38 2006 UTC Added files: /peardoc/en/package/validate/validate_au/validate_au phonenumber.xml region.xml postalcode.xml tfn.xml ssn.xml acn.xml abn.xml /peardoc/en/package/validate/validate_au intro.xml validations.xml constants.xml Modified files: /peardoc/en/package/validate validate_au.xml Log: Added documentation for Validate_AU - including intro and usage, aswell as api docs as generated by PhpDocumentor.

http://cvs.php.net/viewvc.cgi/peardoc/en/package/validate/validate_au.xml?r1=1.2&r2=1.3&diff_format=u Index: peardoc/en/package/validate/validate_au.xml diff -u peardoc/en/package/validate/validate_au.xml:1.2 peardoc/en/package/validate/validate_au.xml:1.3 --- peardoc/en/package/validate/validate_au.xml:1.2 Mon Aug 14 20:37:40 2006 +++ peardoc/en/package/validate/validate_au.xml Tue Aug 29 08:01:38 2006 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.2 $ --> -<!-- $Id: validate_au.xml,v 1.2 2006/08/14 20:37:40 moosh Exp $ --> +<!-- $Revision: 1.3 $ --> +<!-- $Id: validate_au.xml,v 1.3 2006/08/29 08:01:38 ahayes Exp $ --> <!-- CREDITS: doconnor ahayes moosh --> <sect1 id="package.validate.validate-au"> <title>Validate_AU</title> <para> <caution> <para> - This package has no release + This package is in alpha state </para> </caution> Package contains locale validation for Australia such as: @@ -17,6 +17,7 @@ <listitem><para>Phone Number</para></listitem> <listitem><para>Australian Business Number</para></listitem> <listitem><para>Australian Company Number</para></listitem> + <listitem><para>Regions (States)</para></listitem> </orderedlist> </para> <para> @@ -24,11 +25,28 @@ <itemizedlist> <listitem> <para> + <ulink url="http://pear.php.net/package/Validate_AU/docs/latest/">the api documentation</ulink> + </para> + </listitem> + <listitem> + <para> <ulink url="http://pear.php.net/package/Validate_AU/">The page on pear.php.net</ulink> </para> </listitem> </itemizedlist> </para> + &package.validate.validate_au.intro; + &package.validate.validate_au.validations; + &package.validate.validate_au.constants; + &package.validate.validate_au.validate_au.abn; + &package.validate.validate_au.validate_au.acn; + &package.validate.validate_au.validate_au.checkdigit; + &package.validate.validate_au.validate_au.phonenumber; + &package.validate.validate_au.validate_au.postalcode; + &package.validate.validate_au.validate_au.region; + &package.validate.validate_au.validate_au.ssn; + &package.validate.validate_au.validate_au.tfn; + </sect1> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/peardoc/en/package/validate/validate_au/validate_au/phonenumber.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/phonenumber.xml +++ peardoc/en/package/validate/validate_au/validate_au/phonenumber.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.phonenumber"> <refnamediv> <refname><function>Validate_AU::phoneNumber</function></refname> <refpurpose>Validate a telephone number.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::phoneNumber</function></funcdef> <paramdef>string <parameter>$number</parameter></paramdef> <paramdef>int <parameter> <optional>$flags = VALIDATE_AU_PHONENUMBER_NATIONAL</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.desc"> &title.desc; <para>Note that this function supports the following notations:</para> <para><itemizedlist> <listitem><para>Landline: 03 9999 9999</para></listitem> <listitem><para>Mobile: 0400 000 000 (as above, but usually notated differently)</para></listitem> <listitem><para>Indial: 131 812 / 1300 000 000 / 1800 000 000 / 1900 000 000</para></listitem> <listitem><para>International: +61.3 9999 9999</para></listitem> </itemizedlist> For International numbers, only +61 will be valid, as this is Australia&apos;s dial code, and the format MUST be +61.3, where 3 represents the state dial code, in this case, Victoria.</para> <para>Note: If the VALIDATE_AU_PHONENUMBER_STRICT flag is not supplied, then all spaces, dashes and parenthesis are removed before validation. You will have to strip these yourself if your data storage does not allow these characters.</para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$number</parameter> </term> <listitem> <para> The telephone number </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.int; <parameter>$flags</parameter> </term> <listitem> <para> Can be a combination of the following flags: <itemizedlist> <listitem><para><emphasis>VALIDATE_AU_PHONENUMBER_STRICT</emphasis>: if supplied then no spaces, parenthesis or dashes (-) will be removed.</para></listitem> <listitem><para><emphasis>VALIDATE_AU_PHONENUMBER_NATIONAL</emphasis>: when supplied valid national numbers (eg. 03 9999 9999) will return &true;.</para></listitem> <listitem><para><emphasis>VALIDATE_AU_PHONENUMBER_INDIAL</emphasis>: when supplied valid indial numbers (eg. 13/1300/1800/1900) will return &true;.</para></listitem> <listitem><para><emphasis>VALIDATE_AU_PHONENUMBER_INTERNATIONAL</emphasis>: when supplied valid international notation of Australian numbers (eg. +61.3 9999 9999) will return &true;.</para></listitem> </itemizedlist> </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.todo"> &title.todo; <para> <emphasis>todo</emphasis> Check that $flags contains a valid flag. </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.author"> <title>author</title> <para> <emphasis>author</emphasis> Alex Hayes &lt;<ulink url="mailto:ahayes@wcg.net.au">ahayes@wcg.net.au</ulink>&gt; </para> <para> <emphasis>author</emphasis> Daniel O&apos;Connor &lt;<ulink url="mailto:daniel.oconnor@gmail.com">daniel.oconnor@gmail.com</ulink>&gt; </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.phonenumber.note"> &title.note; &note.notstatic; </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_au/validate_au/region.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/region.xml +++ peardoc/en/package/validate/validate_au/validate_au/region.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.region"> <refnamediv> <refname><function>Validate_AU::region</function></refname> <refpurpose>Validates Australian Regional Codes</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::region</function></funcdef> <paramdef>string <parameter>$region</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.region.desc"> &title.desc; &notdocumented; </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$region</parameter> </term> <listitem> <para> region code to validate </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.returns"> &title.returns; <para> <emphasis>returns</emphasis> returns true on success, false otherwise </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.see"> &title.see; <para> <emphasis>see</emphasis> <ulink url="http://www.google.com/apis/adwords/developer/adwords_api_regions.html#Australia">http://www.google.com/apis/adwords/developer/adwords_api_regions.html#Australia</ulink> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.author"> <title>author</title> <para> <emphasis>author</emphasis> Byron Adams &lt;<ulink url="mailto:byron.adams54@gmail.com">byron.adams54@gmail.com</ulink>&gt; </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.region.note"> &title.note; &note.notstatic; </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_au/validate_au/postalcode.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/postalcode.xml +++ peardoc/en/package/validate/validate_au/validate_au/postalcode.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.postalcode"> <refnamediv> <refname><function>Validate_AU::postalCode</function></refname> <refpurpose>Validate Austrialian postal codes.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::postalCode</function></funcdef> <paramdef>string <parameter>$postcode</parameter></paramdef> <paramdef>bool <parameter> <optional>$strong = &false;</optional></parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.postalcode.desc"> &title.desc; &notdocumented; </refsect1> <refsect1 id="package.validate.validate-au.validate-au.postalcode.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$postcode</parameter> </term> <listitem> <para> postcode to validate </para> </listitem> </varlistentry> </variablelist> <variablelist> <varlistentry> <term> &type.bool; <parameter>$strong</parameter> </term> <listitem> <para> strong checks against a list of postcodes </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.postalcode.returns"> &title.returns; <para> <emphasis>returns</emphasis> true if postcode is ok, false otherwise </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.postalcode.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.postalcode.note"> &title.note; &note.notstatic; </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_au/validate_au/tfn.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/tfn.xml +++ peardoc/en/package/validate/validate_au/validate_au/tfn.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.tfn"> <refnamediv> <refname><function>Validate_AU::tfn</function></refname> <refpurpose>Tax File Number (TFN)</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::tfn</function></funcdef> <paramdef>string <parameter>$tfn</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.tfn.desc"> &title.desc; <para>Australia does not have a social security number system, the closest equivalent is a Tax File Number.</para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$tfn</parameter> </term> <listitem> <para> Tax File Number </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.returns"> &title.returns; <para> <emphasis>returns</emphasis> Returns true on success, false otherwise </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.author"> <title>author</title> <para> <emphasis>author</emphasis> Byron Adams &lt;<ulink url="mailto:byron.adams54@gmail.com">byron.adams54@gmail.com</ulink>&gt; </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.see"> &title.see; <para> <emphasis>see</emphasis> <ulink url="http://en.wikipedia.org/wiki/Tax_File_Number">http://en.wikipedia.org/wiki/Tax_File_Number</ulink> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.tfn.note"> &title.note; &note.notstatic; </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_au/validate_au/ssn.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/ssn.xml +++ peardoc/en/package/validate/validate_au/validate_au/ssn.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.ssn"> <refnamediv> <refname><function>Validate_AU::ssn</function></refname> <refpurpose>Social Security Number.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::ssn</function></funcdef> <paramdef>string <parameter>$ssn</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.ssn.desc"> &title.desc; <para>Australia does not have a social security number system, the closest equivalent is a Tax File Number</para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.ssn.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$ssn</parameter> </term> <listitem> <para> ssn number to validate </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.ssn.returns"> &title.returns; <para> <emphasis>returns</emphasis> Returns true on success, false otherwise </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.ssn.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.ssn.see"> &title.see; <para> <emphasis>see</emphasis> <link linkend="package.validate.validate-au.validate-au.tfn"><function>Validate_AU::tfn</function></link> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.ssn.note"> &title.note; &note.notstatic; </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_au/validate_au/acn.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/acn.xml +++ peardoc/en/package/validate/validate_au/validate_au/acn.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.acn"> <refnamediv> <refname><function>Validate_AU::acn</function></refname> <refpurpose>Validate an Australian Company Number (ACN)</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::acn</function></funcdef> <paramdef>string <parameter>$acn</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.acn.desc"> &title.desc; <para>The ACN is a nine digit number with the last digit being a check digit calculated using a modified modulus 10 calculation.</para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$acn</parameter> </term> <listitem> <para> ACN number to validate </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.returns"> &title.returns; <para> <emphasis>returns</emphasis> Returns true on success, false otherwise </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.author"> <title>author</title> <para> <emphasis>author</emphasis> Byron Adams &lt;<ulink url="mailto:byron.adams54@gmail.com">byron.adams54@gmail.com</ulink>&gt; </para> <para> <emphasis>author</emphasis> Daniel O&apos;Connor &lt;<ulink url="mailto:daniel.oconnor@gmail.com">daniel.oconnor@gmail.com</ulink>&gt; </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.see"> &title.see; <para> <emphasis>see</emphasis> <ulink url="http://www.asic.gov.au/asic/asic_infoco.nsf/byheadline/Australian+Company+Number+(ACN)+Check+Digit">http://www.asic.gov.au/asic/asic_infoco.nsf/byheadline/Australian+Company+Number+(ACN)+Check+Digit</ulink> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.acn.note"> &title.note; &note.notstatic; </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_au/validate_au/abn.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validate_au/abn.xml +++ peardoc/en/package/validate/validate_au/validate_au/abn.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.validate-au.abn"> <refnamediv> <refname><function>Validate_AU::abn</function></refname> <refpurpose>Australian Business Number (ABN).</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once &apos;/Validate/AU.php&apos;; </funcsynopsisinfo> <funcprototype> <funcdef>bool <function>Validate_AU::abn</function></funcdef> <paramdef>string <parameter>$abn</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.validate.validate-au.validate-au.abn.desc"> &title.desc; <para>Validates an ABN using a modulus calculation</para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.param"> &title.param; <para> <variablelist> <varlistentry> <term> &type.string; <parameter>$abn</parameter> </term> <listitem> <para> ABN to validate </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.returns"> &title.returns; <para> <emphasis>returns</emphasis> Returns true on success, otherwise false </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.throws"> &title.throws; <para> <emphasis>throws</emphasis> no exceptions thrown </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.author"> <title>author</title> <para> <emphasis>author</emphasis> Byron Adams &lt;<ulink url="mailto:byron.adams54@gmail.com">byron.adams54@gmail.com</ulink>&gt; </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.see"> &title.see; <para> <emphasis>see</emphasis> <ulink url="http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htm">http://www.ato.gov.au/businesses/content.asp?doc=/content/13187.htm</ulink> </para> </refsect1> <refsect1 id="package.validate.validate-au.validate-au.abn.note"> &title.note; &note.notstatic; </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_au/intro.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/intro.xml +++ peardoc/en/package/validate/validate_au/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- $Id: intro.xml,v 1.1 2006/08/29 08:01:37 ahayes Exp $ --> <!-- package-release: beta --> <refentry id="package.validate.validate_au.intro"> <refnamediv> <refname>Introduction</refname> <refpurpose>introduction to Validate_AU</refpurpose> </refnamediv> <refsect1 id="package.validate.validate_au.intro.desc"> &title.desc; <para> The package offers some methods to validate specific data for Australia </para> <para> </para> </refsect1> <refsect1 id="package.validate.validate_au.intro.usage"> <title>Usage</title> <refsect2 id="package.validate.validate_au.intro.usage.general"> <title>General usage</title> <para> Every module of Validate follows the same philosophy. Propose some validation method which returns a boolean result. Some methods have some optional parameters to set stronger checks. </para> </refsect2> <refsect2 id="package.validate.validate_au.intro.usage.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once 'Validate/AU.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_au/validations.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/validations.xml +++ peardoc/en/package/validate/validate_au/validations.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <!-- $Id: validations.xml,v 1.1 2006/08/29 08:01:37 ahayes Exp $ --> <!-- package-release: alpha --> <refentry id="package.validate.validate_au.validations"> <refnamediv> <refname>List of available validations</refname> <refpurpose>available validation in Validate_AU</refpurpose> </refnamediv> <refsect1 id="package.validate.validate_au.validations.tfn"> <title>Validate a Australian TFN / SSN</title> <para> Most Australian's will have a TFN (Tax File Number) however not all, it is the closet equivalent we have to a Social Security Number. Note that this validation routine can be accessed through both Validate_AU::tfn() and Valdiate::ssn() methods. </para> <refsect2 id="package.validate.validate_au.validations.tfn.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $badTFN = '23 456 782'; $result = Validate_AU::tfn($badTFN); echo 'Test ' . $badTFN .' : <br />'; var_export($result); echo '<br /><br />'; $goodTFN = '123 456 782'; $result = Validate_AU::tfn($goodTFN); echo 'Test ' . $goodNationalId .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 23 456 782 : false Test 123 456 782 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_au.validations.postcode"> <title>Validate a Australian postcode</title> <para>Australian 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> <refsect2 id="package.validate.validate_au.validations.postcode.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $badPostCode = 'ABCD'; $result = Validate_AU::postalCode($badPostCode); echo 'Test ' . $badPostCode .' : <br />'; var_export($result); echo '<br /><br />'; $goodPostCode = '3000'; $result = Validate_AU::postalCode($goodPostCode); echo 'Test ' . $goodPostCode .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test ABCD : false Test 3000 : true </computeroutput> </screen> </para> </refsect2> <refsect2 id="package.validate.validate_au.validations.postcode.sample.strong"> <title>sample using strong parameter</title> <para> 1234 appears to be a valid 4 digit postcode, however it does not appear in the official list. <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $badPostCode = '1234'; $goodPostCode = '7930'; $result = Validate_AU::postalCode($badPostCode); echo 'Test ' . $badPostCode .' : <br />'; var_export($result); $result = Validate_AU::postalCode($badPostCode, false); echo '<br /><br />Test ' . $badPostCode .' : <br />'; var_export($result); $result = Validate_AU::postalCode($badPostCode, true); echo '<br /><br />Test ' . $badPostCode .' : <br />'; var_export($result); $result = Validate_AU::postalCode($goodPostCode, true); echo '<br /><br />Test ' . $goodPostCode .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 1234 : true Test 1234 : true Test 1234 : false Test 7930 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_au.validations.abn"> <title>Validate an ABN</title> <para>Validate an Australian Business Number.</para> <refsect2 id="package.validate.validate_au.validations.abn.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $badABN = '00 043 145 470'; $result = Validate_AU::abn($badABN); echo 'Test ' . $badRegion .' : <br />'; var_export($result); echo '<br /><br />'; $goodABN = '28 043 145 470'; $result = Validate_AU::abn($goodABN); echo 'Test ' . $goodRegion .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 00 043 145 470 : false Test 28 043 145 470 : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_au.validations.region"> <title>Validate a Region / State</title> <para>Validates a 2/3 region (state) code.</para> <refsect2 id="package.validate.validate_au.validations.region.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $badRegion = 'asdf'; $result = Validate_AU::region($badVAT); echo 'Test ' . $badRegion .' : <br />'; var_export($result); echo '<br /><br />'; $goodRegion = 'VIC'; $result = Validate_AU::region($goodRegion); echo 'Test ' . $goodRegion .' : <br />'; var_export($result); ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test asdf : false Test VIC : true </computeroutput> </screen> </para> </refsect2> </refsect1> <refsect1 id="package.validate.validate_au.validations.phonenumber"> <title>Validate a phonenumber</title> <para> Validate an Australian phone number passed as first param. Second parameter can be used to specify flags that signify the type of number to be validated. </para> <para> Flags can be any combination of the bitwise constants VALIDATE_AU_PHONENUMBER_* as follows: <table> <title>Validate_AU Phone Number Flags</title> <tgroup cols="2"> <thead> <row> <entry>Flag</entry> <entry>Description</entry> </row> </thead> <tbody> <row> <entry><quote>VALIDATE_AU_PHONENUMBER_STRICT</quote></entry> <entry> If supplied then no spaces, parenthesis or dashes (-) will be removed. </entry> </row> <row> <entry><quote>VALIDATE_AU_PHONENUMBER_NATIONAL</quote></entry> <entry> If supplied, then valid national numbers, both landline and mobile will pass validation. </entry> </row> <row> <entry><quote>VALIDATE_AU_PHONENUMBER_INDIAL</quote></entry> <entry> If supplied, then valid indial (13/1300/1800/1900) numbers will pass validation. </entry> </row> <row> <entry><quote>VALIDATE_AU_PHONENUMBER_INTERNATIONAL</quote></entry> <entry> If supplied, then valid international syntax will pass validation. EG. +61.3 9999 9999 </entry> </row> </tbody> </tgroup> </table> </para> <refsect2 id="package.validate.validate_au.validations.phonenumber.sample"> <title>sample</title> <para> <programlisting role="php"> <![CDATA[ <?php // Include the package require_once('Validate/AU.php'); $nationalPhone = '03 9999 9999'; $nationalStrictPhone = '0399999999'; $indialPhone = '1300 131 121'; $internationalSyntax = '+61.3 8779 7212'; echo 'Test ' . $goodPhone .' : <br />'; $result = Validate_AU::phoneNumber($nationalPhone); // the flag VALIDATE_AU_PHONENUMBER_NATIONAL is default var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalPhone, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_STRICT); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalPhone, VALIDATE_AU_PHONENUMBER_INDIAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalPhone, VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalPhone, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_INDIAL | VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result); echo '<br /><br />'; echo 'Test ' . $nationalStrictPhone .' : <br />'; $result = Validate_AU::phoneNumber($nationalStrictPhone); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalStrictPhone, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_STRICT); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalStrictPhone, VALIDATE_AU_PHONENUMBER_INDIAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalStrictPhone, VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($nationalStrictPhone, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_INDIAL | VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; echo '<br /><br />'; echo 'Test ' . $indialPhone .' : <br />'; $result = Validate_AU::phoneNumber($indialPhone); var_export($result) . '-'; $result = Validate_AU::phoneNumber($indialPhone, VALIDATE_AU_PHONENUMBER_INDIAL | VALIDATE_AU_PHONENUMBER_STRICT); var_export($result) . '-'; $result = Validate_AU::phoneNumber($indialPhone, VALIDATE_AU_PHONENUMBER_INDIAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($indialPhone, VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($indialPhone, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_INDIAL | VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; echo '<br /><br />'; echo 'Test ' . $internationalSyntax .' : <br />'; $result = Validate_AU::phoneNumber($internationalSyntax); var_export($result) . '-'; $result = Validate_AU::phoneNumber($internationalSyntax, VALIDATE_AU_PHONENUMBER_INTERNATIONAL | VALIDATE_AU_PHONENUMBER_STRICT); var_export($result) . '-'; $result = Validate_AU::phoneNumber($internationalSyntax, VALIDATE_AU_PHONENUMBER_INDIAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($internationalSyntax, VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; $result = Validate_AU::phoneNumber($internationalSyntax, VALIDATE_AU_PHONENUMBER_NATIONAL | VALIDATE_AU_PHONENUMBER_INDIAL | VALIDATE_AU_PHONENUMBER_INTERNATIONAL); var_export($result) . '-'; ?> ]]> </programlisting> </para> <para> Output : <screen> <computeroutput> Test 03 9999 9999 : true - false - false - false - true Test 0399999999 : true - true - false - false - true Test 1300 131 121 : false - false - true - false - true Test +61.3 8779 7212 : false - false - true - true - true </computeroutput> </screen> </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_au/constants.xml?view=markup&rev=1.1 Index: peardoc/en/package/validate/validate_au/constants.xml +++ peardoc/en/package/validate/validate_au/constants.xml <!-- $Revision: 1.1 $ --> <refentry id="package.validate.validate-au.constants"> <refnamediv> <refname>Package Validate_AU Constants</refname> <refpurpose>Constants defined in and used by Validate_AU</refpurpose> </refnamediv> <refsect1 id="package.validate.validate-au.constants.details"> <title>All Constants</title> <refsect2 id="package.validate.validate-au.constants.details.validateau---php"> <title> Constants defined in Validate_AU.php </title> <para> <table> <title>Constants defined in Validate_AU.php</title> <tgroup cols="3"> <thead> <row> <entry>Name</entry> <entry>Value</entry> <entry>Line Number</entry> </row> </thead> <tbody> <row> <entry>VALIDATE_AU_PHONENUMBER_INDIAL</entry> <entry>4</entry> <entry>37</entry> </row> <row> <entry>VALIDATE_AU_PHONENUMBER_INTERNATIONAL</entry> <entry>8</entry> <entry>38</entry> </row> <row> <entry>VALIDATE_AU_PHONENUMBER_NATIONAL</entry> <entry>2</entry> <entry>36</entry> </row> <row> <entry>VALIDATE_AU_PHONENUMBER_STRICT</entry> <entry>1</entry> <entry>35</entry> </row> </tbody> </tgroup> </table> </para> </refsect2> </refsect1> </refentry> <!-- Generated by phpDocumentor v 1.3.0RC6 http://www.phpdoc.org --> <!-- 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 (#8382) next »