Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D9BCE1E1 for ; Fri, 1 Feb 2013 13:18:40 +0000 (UTC) Received: (qmail 39077 invoked by uid 500); 1 Feb 2013 13:18:39 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 38997 invoked by uid 500); 1 Feb 2013 13:18:38 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 38970 invoked by uid 99); 1 Feb 2013 13:18:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 13:18:38 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.217.182] (HELO mail-lb0-f182.google.com) (209.85.217.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 13:18:33 +0000 Received: by mail-lb0-f182.google.com with SMTP id gg6so4572279lbb.27 for ; Fri, 01 Feb 2013 05:18:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :x-gm-message-state; bh=j5xr/4QfJmqqbpcdc/ak9dKwH1KNIhwPOlf4/KLs/E4=; b=k5eoMii0XfMXWHcDPd+ky5lselepFSS4s2Yzju1P8CE2ctqqaW+EplkLLokPCo2Vnn wHsla/F3HezE1NlRxnndA8zQQY5pP89PsU8HzEAv8GYJ69IZKjIpeYC4CDCUTHCK9bIl kkHD2AmU9GNGK5Joi4YlAzzdEMGJ15UPLfDA6RSYoqr4UGeL8PniWI2FNH97nEx0O2OK 9Nc4ZK6B6uFnJ2L+qdRya3VuvPBxraJN9jde2fJk+QVgAeDUDCesNmD11giUsLghrCMi C6/dHjzhXwrtdVz+jm7s0kDo3EVR0RLsj2KrBfJJxkQkQA1VwiLYg47D6k4hpXwEeLOm y2pg== MIME-Version: 1.0 X-Received: by 10.112.51.34 with SMTP id h2mr4842487lbo.39.1359724691585; Fri, 01 Feb 2013 05:18:11 -0800 (PST) Sender: jcarman@carmanconsulting.com Received: by 10.112.36.170 with HTTP; Fri, 1 Feb 2013 05:18:11 -0800 (PST) In-Reply-To: <45de9ea774160ca45fe8a29cd82624a0@xs4all.nl> References: <3db9125333f8a595a6c49b34854c58da@xs4all.nl> <9e11156e265bb4598fb1fe39917dc50a@xs4all.nl> <45de9ea774160ca45fe8a29cd82624a0@xs4all.nl> Date: Fri, 1 Feb 2013 08:18:11 -0500 X-Google-Sender-Auth: g3gJm7FNSkSiRdUZD0erPYspkV4 Message-ID: Subject: Re: [Validator] Unable to validate an IBAN with IbanCheckDigit.isValid(ibanNbr) From: James Carman To: Commons Users List Content-Type: multipart/alternative; boundary=f46d0421a95b3bfa2904d4a9939a X-Gm-Message-State: ALoCoQlpx1x58rI33rPNROuTKF0NBwDfdrcvCz0/dNdmxU68PGAy6Rn8cDggMqoOfpuJdlvpDcvk X-Virus-Checked: Checked by ClamAV on apache.org --f46d0421a95b3bfa2904d4a9939a Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable No embarrassment necessary. The fact that you asked the question might let other folks know that IBANs are supported. It's all about community. Questions/discussions always welcome! On Friday, February 1, 2013, Pim wrote: > This is embarrassing. > It indeed works. > > I'm sorry I've taken up time. > > kind regards, > Pim. > > sebb schreef op 2013-02-01 13:24: > > On 1 February 2013 11:53, Pim wrote: > > Hi Sebb, > > I totally agree with you. > Now the bank account number was made up because didn't want my number in = a > publc list. > However here is a real one: DE46310601810088194012 > > Which I checked on the site : http://www.ibancalculator.com/ > The number is validated as valid. On all specifications. > > However when i validate using the commons isvalid it returns false. > > IBANCheckDigit IbanCheckDigit =3D new IBANCheckDigit(); > boolean isIbanCheckOK =3D IbanCheckDigit.isValid("** > DE46310601810088194012"); > Any ideas why the commons validation return false? > > > Works OK for me with the code in trunk. > > Pim > > sebb schreef op 2013-02-01 12:04: > > On 1 February 2013 10:23, Pim wrote: > > > Hi Julien, > > Maybe there are different definitions of IBAN: > http://en.wikipedia.org/wiki/**International_Bank_Account_**Number > Given examples are: > Country IBAN formatting example > Greece GR16 0110 1250 0000 0001 2300 695 > United Kingdom GB29 NWBK 6016 1331 9268 19 > Saudi Arabia SA03 8000 0000 6080 1016 7519 > Switzerland CH93 0076 2011 6238 5295 7 > Israel IL62 0108 0000 0009 9999 999 > > > Which is similar to the option I tested as //NL80RABO0001234567 > Where > NL the country code is > 80 the check digit is > > > > Are you sure that is the correct check digit? > > RABO is the associated bank. In this case (Rabobank which is a dutch > bank) > 0001234567 The actual bank account number. > > > > That looks like a made-up number. > > The other number versions in the list are the semy translated version. > 271011240310716969232100 > 27101124 -> RABO as char position in alphabet + 9 > 0310716969 -> unchanged bank account number > 2321 -> NL as char position in alphabet + 9 > 00 -> Is the check digit 80 but set to 00 for validation as mentioned in > the > java class. > > > > No, the check digits need to be set to 00 in order to calculate them, > not for validation. > > Either use: > > IBANCheckDigit.IBAN_CHECK_**DIGIT.isValid("**NL80RABO0001234567"); // =3D= > > false > or > IBANCheckDigit.IBAN_CHECK_**DIGIT.calculate("**NL00RABO0001234567"); > > Since I have tried several option and non seem to work. I'm confused wha= t > the actual input should be. > > Pim > > > > Julien Wajsberg schreef op 2013-02-01 11:00: > > Hi, > > You may be confused as these numbers do not look like IBAN at all. > > An IBAN is a normalized bank account number in use in European > countries. > > For more information you can look the Wikipedia page at > http://fr.m.wikipedia.org/**wiki/ISO_13616 > > Regards, > -- > Julien > Le 1 f=E9vr. 2013 10:51, "Pim" a =E9crit : > > Hello, > > I'm looking for some advice on how to use the IBAN validation. > > So far I have coded this: > //INGB0001234567NL > //NL80RABO0001234567 > //271011240001234567232100 > String ibanNbr =3D "271011240310716969232100"; > IBANCheckDigit IbanCheckDigit =3D new IBANCheckDigit(); > boolean isIbanCheckOK =3D IbanCheckDigit.isValid(****ibanNbr); > > But all call have come back false. Even when I enter a valid IBAN > number. > I confused what it needs to propery validate an IBAN number. I presume > this should work : INGB0001234567NL > As this is the business format of a IBAN number. > > Any > > --f46d0421a95b3bfa2904d4a9939a--