I've found a PHP one, but no luck so far searching for one in CF.
So far, what I've come up with is
Len(ABN) eq 11
which is a bit like Blackadder and Baldrick's s rewrite of Dr.
Johnson's dictionary, stuck on Aardvark
http://www.abn.business.gov.au/ABRXMLSearch/
-------------------------------------------------------------------
Andrew Muller
http://www.webqem.com
linkedin: http://www.linkedin.com/pub/1/151/905
Why bother using an authoritative source when you can spend hours
trying to reverse engineer the business rules and invent your own
method of validation instead?
On 4/9/07, Andrew Muller <andrew...@gmail.com> wrote:
>
>
>
>
> On 09/04/07, Stephen M <sgmu...@gmail.com> wrote:
> >
> > So, has anyone got a Cold Fusion ABN validator they can throw me?
> >
> > I've found a PHP one, but no luck so far searching for one in CF.
> >
> > So far, what I've come up with is
> >
> > Len(ABN) eq 11
> >
> > which is a bit like Blackadder and Baldrick's s rewrite of Dr.
> > Johnson's dictionary, stuck on Aardvark
> >
> >
> > >
> >
>
>
> -------------------------------------------------------------------
> Andrew Muller
> http://www.webqem.com
>
> linkedin: http://www.linkedin.com/pub/1/151/905
>
> >
>
--
Mark Stanton
Gruden Pty Ltd
http://www.gruden.com
Thanks for the input Simon I've always wondered how an ABN was generated.
-----Original Message-----
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf
On the one hand you have a method that will give you a yes or no
answer that is guaranteed to be correct. On the other hand you roll
your own approach that will at best give you something along the lines
of "I'm really not sure but that looks kinda right".
Yes, there are some cases where a web service or HTTP GET are not
applicable, but unless you have specific reasons that stops you, the
ABR web service is the better choice.
My approach is to validate, ask the user to check that what they have
entered is correct, then submit.
regards,
Stephen
The web service is pretty damn fast (<500ms for the round trip), but
if you are worried about performance you could validate the format
and/or build up a local cache of ABNs that have passed validation
already.
Cheers
Mark
LOL,
Yes Mark...
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
From: cfau...@googlegroups.com
[mailto:cfau...@googlegroups.com] On Behalf Of Simon Haddon
Sent: Tuesday, 10 April 2007 7:05 AM
To: cfau...@googlegroups.com
Subject: [cfaussie] Re: validating an ABN
Oh. I was not trying to be sarcastic at any time. I was just trying to help
So this begs the question, what is really so special about the number that
needs validating?
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
-----Original Message-----
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf
Of Mark Stanton
Sent: Tuesday, 10 April 2007 9:26 AM
To: cfau...@googlegroups.com
Subject: [cfaussie] Re: validating an ABN
Hi,
I did this in an excel spreadsheet years ago. Initially followed the instructions on the ATO website but found they were slightly wrong.
So after a little mucking around and validations against known ABN's I came up with a formula that works. (Which is only slightly different to what the ATO said anyway).
An ABN is one way of establishing identity. It's like to a drivers
licence or social security number for companies (except that the
information associated with it is public). In my mind it is different
to a phone number in this respect. It is one thing to have a number
that matches the pattern of an ABN, it is another to have an verified,
active ABN, because from there you can gather all sorts of other
information like GST status, registered address, trading name, etc...
If you need to do business with other companies this is very important.
Imagine you provide financing for company cars and I'm on your website
filling out some forms to set up a new lease. If I make an honest
mistake and get a couple of digits wrong on my ABN, this is going to
impact the validity of the lease agreement and the correctness of your
accounting.
Add to this that I could deliberately be providing you with an ABN
that looks right, but isn't ok for business (e.g.
http://tinyurl.com/23rxso).
Thanks I am very well aware of what the ABN signifies, or did you not read
the question properly.
As far as the wrong ABN number on forms yes I am aware of that, but until
this discussion I wasn't even aware that the ABN has a checksum style
attribute embeded in the number.
Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613 8676 4223
Mobile: 0404 998 273
-----Original Message-----
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf
Of Mark Stanton
Sent: Tuesday, 10 April 2007 10:13 AM
To: cfau...@googlegroups.com
Subject: [cfaussie] Re: validating an ABN