Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-04 Thread Gary Gregory
which of course https://www.youtube.com/watch?v=G2eUopy9sd8

G

On Sat, Feb 4, 2017 at 3:22 PM, Gary Gregory  wrote:

> Good one Matt ;-)
>
> G
>
> On Fri, Feb 3, 2017 at 5:06 PM, Matt Sicker  wrote:
>
>> Yup, found it: <
>> https://lists.apache.org/thread.html/095664f9bb67602f308cf1a
>> 0d492de662992462314eb1e97fbd34ec6@%3Cdev.commons.apache.org%3E
>> >
>>
>> On 3 February 2017 at 19:05, Matt Sicker  wrote:
>>
>> > I'm pretty sure you two have had almost this exact conversation before.
>> >
>> > On 3 February 2017 at 17:41, sebb  wrote:
>> >
>> >> I don't see the point; it changes only rarely and it would require
>> >> extra work to read the data and handle errors.
>> >>
>> >> On 3 February 2017 at 18:59, Gary Gregory 
>> wrote:
>> >> > How about externalizing this in a txt file?
>> >> >
>> >> > Gary
>> >> >
>> >> > -- Forwarded message --
>> >> > From: 
>> >> > Date: Fri, Feb 3, 2017 at 10:58 AM
>> >> > Subject: svn commit: r1781587 -
>> >> > /commons/proper/validator/trunk/src/main/java/org/apache/
>> >> commons/validator/routines/IBANValidator.java
>> >> > To: comm...@commons.apache.org
>> >> >
>> >> >
>> >> > Author: sebb
>> >> > Date: Fri Feb  3 18:58:57 2017
>> >> > New Revision: 1781587
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=1781587=rev
>> >> > Log:
>> >> > Sort by country-code
>> >> >
>> >> > Modified:
>> >> > commons/proper/validator/trunk/src/main/java/org/
>> >> > apache/commons/validator/routines/IBANValidator.java
>> >> >
>> >> > Modified: commons/proper/validator/trunk/src/main/java/org/
>> >> > apache/commons/validator/routines/IBANValidator.java
>> >> > URL: http://svn.apache.org/viewvc/commons/proper/validator/
>> >> > trunk/src/main/java/org/apache/commons/validator/
>> >> > routines/IBANValidator.java?rev=1781587=1781586=178158
>> 7=diff
>> >> > 
>> >> > ==
>> >> > --- commons/proper/validator/trunk/src/main/java/org/
>> >> > apache/commons/validator/routines/IBANValidator.java (original)
>> >> > +++ commons/proper/validator/trunk/src/main/java/org/
>> >> > apache/commons/validator/routines/IBANValidator.java Fri Feb  3
>> >> 18:58:57
>> >> > 2017
>> >> > @@ -94,78 +94,78 @@ public class IBANValidator {
>> >> >   */
>> >> >
>> >> >  private static final Validator[] DEFAULT_FORMATS = {
>> >> > -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>> >> >  ), // Albania
>> >> >  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
>> >> >  ), // Andorra
>> >> > +new Validator("AE", 23, "AE\\d{21}"
>> >> >  ), // United Arab Emirates
>> >> > +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>> >> >  ), // Albania
>> >> >  new Validator("AT", 20, "AT\\d{18}"
>> >> >  ), // Austria
>> >> >  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
>> >> >   ), // Republic of Azerbaijan
>> >> > -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>> >> >   ), // Bahrain (Kingdom of)
>> >> > -new Validator("BE", 16, "BE\\d{14}"
>> >> >  ), // Belgium
>> >> >  new Validator("BA", 20, "BA\\d{18}"
>> >> >  ), // Bosnia and Herzegovina
>> >> > -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>> >> >   ), // Brazil
>> >> > +new Validator("BE", 16, "BE\\d{14}"
>> >> >  ), // Belgium
>> >> >  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9
>> >> ]{8}"
>> >> >  ), // Bulgaria
>> >> > +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>> >> >   ), // Bahrain (Kingdom of)
>> >> > +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>> >> >   ), // Brazil
>> >> > +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
>> >> >   ), // Switzerland
>> >> >  new Validator("CR", 22, "CR\\d{20}"
>> >> >  ), // Costa Rica
>> >> > -new Validator("HR", 21, "HR\\d{19}"
>> >> >  ), // Croatia
>> >> >  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
>> >> >  ), // Cyprus
>> >> >  new Validator("CZ", 24, "CZ\\d{22}"
>> >> >  ), // Czech Republic
>> >> > +new Validator("DE", 22, "DE\\d{20}"
>> >> >  ), // Germany
>> >> >  new Validator("DK", 18, "DK\\d{16}"
>> >> >  ), // Denmark
>> >> > -new Validator("FO", 18, "FO\\d{16}"
>> >> >  ), // Denmark (Faroes)
>> >> > -new Validator("GL", 18, "GL\\d{16}"
>> >> >  ), // Denmark (Greenland)
>> >> >  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
>> >> >   ), // Dominican Republic
>> >> >  new Validator("EE", 20, "EE\\d{18}"
>> >> >  ), // Estonia
>> >> > +new Validator("ES", 24, "ES\\d{22}"
>> >> >  ), // Spain
>> >> >  new Validator("FI", 18, "FI\\d{16}"
>> >> >  ), // Finland
>> >> > +new 

Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-04 Thread Gary Gregory
Good one Matt ;-)

G

On Fri, Feb 3, 2017 at 5:06 PM, Matt Sicker  wrote:

> Yup, found it: <
> https://lists.apache.org/thread.html/095664f9bb67602f308cf1a0d492de
> 662992462314eb1e97fbd34ec6@%3Cdev.commons.apache.org%3E
> >
>
> On 3 February 2017 at 19:05, Matt Sicker  wrote:
>
> > I'm pretty sure you two have had almost this exact conversation before.
> >
> > On 3 February 2017 at 17:41, sebb  wrote:
> >
> >> I don't see the point; it changes only rarely and it would require
> >> extra work to read the data and handle errors.
> >>
> >> On 3 February 2017 at 18:59, Gary Gregory 
> wrote:
> >> > How about externalizing this in a txt file?
> >> >
> >> > Gary
> >> >
> >> > -- Forwarded message --
> >> > From: 
> >> > Date: Fri, Feb 3, 2017 at 10:58 AM
> >> > Subject: svn commit: r1781587 -
> >> > /commons/proper/validator/trunk/src/main/java/org/apache/
> >> commons/validator/routines/IBANValidator.java
> >> > To: comm...@commons.apache.org
> >> >
> >> >
> >> > Author: sebb
> >> > Date: Fri Feb  3 18:58:57 2017
> >> > New Revision: 1781587
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=1781587=rev
> >> > Log:
> >> > Sort by country-code
> >> >
> >> > Modified:
> >> > commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java
> >> >
> >> > Modified: commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java
> >> > URL: http://svn.apache.org/viewvc/commons/proper/validator/
> >> > trunk/src/main/java/org/apache/commons/validator/
> >> > routines/IBANValidator.java?rev=1781587=1781586=
> 1781587=diff
> >> > 
> >> > ==
> >> > --- commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java (original)
> >> > +++ commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java Fri Feb  3
> >> 18:58:57
> >> > 2017
> >> > @@ -94,78 +94,78 @@ public class IBANValidator {
> >> >   */
> >> >
> >> >  private static final Validator[] DEFAULT_FORMATS = {
> >> > -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >> >  ), // Albania
> >> >  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
> >> >  ), // Andorra
> >> > +new Validator("AE", 23, "AE\\d{21}"
> >> >  ), // United Arab Emirates
> >> > +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >> >  ), // Albania
> >> >  new Validator("AT", 20, "AT\\d{18}"
> >> >  ), // Austria
> >> >  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
> >> >   ), // Republic of Azerbaijan
> >> > -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >> >   ), // Bahrain (Kingdom of)
> >> > -new Validator("BE", 16, "BE\\d{14}"
> >> >  ), // Belgium
> >> >  new Validator("BA", 20, "BA\\d{18}"
> >> >  ), // Bosnia and Herzegovina
> >> > -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >> >   ), // Brazil
> >> > +new Validator("BE", 16, "BE\\d{14}"
> >> >  ), // Belgium
> >> >  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9
> >> ]{8}"
> >> >  ), // Bulgaria
> >> > +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >> >   ), // Bahrain (Kingdom of)
> >> > +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >> >   ), // Brazil
> >> > +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
> >> >   ), // Switzerland
> >> >  new Validator("CR", 22, "CR\\d{20}"
> >> >  ), // Costa Rica
> >> > -new Validator("HR", 21, "HR\\d{19}"
> >> >  ), // Croatia
> >> >  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
> >> >  ), // Cyprus
> >> >  new Validator("CZ", 24, "CZ\\d{22}"
> >> >  ), // Czech Republic
> >> > +new Validator("DE", 22, "DE\\d{20}"
> >> >  ), // Germany
> >> >  new Validator("DK", 18, "DK\\d{16}"
> >> >  ), // Denmark
> >> > -new Validator("FO", 18, "FO\\d{16}"
> >> >  ), // Denmark (Faroes)
> >> > -new Validator("GL", 18, "GL\\d{16}"
> >> >  ), // Denmark (Greenland)
> >> >  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
> >> >   ), // Dominican Republic
> >> >  new Validator("EE", 20, "EE\\d{18}"
> >> >  ), // Estonia
> >> > +new Validator("ES", 24, "ES\\d{22}"
> >> >  ), // Spain
> >> >  new Validator("FI", 18, "FI\\d{16}"
> >> >  ), // Finland
> >> > +new Validator("FO", 18, "FO\\d{16}"
> >> >  ), // Denmark (Faroes)
> >> >  new Validator("FR", 27, "FR\\d{12}[A-Z0-9]{11}\\d{2}"
> >> >  ), // France
> >> > +new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
> >> >  ), // United Kingdom
> >> >  

Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-04 Thread Benedikt Ritter
Matt, you just made my day! :-)

Matt Sicker  schrieb am Sa. 4. Feb. 2017 um 02:07:

> Yup, found it: <
>
> https://lists.apache.org/thread.html/095664f9bb67602f308cf1a0d492de662992462314eb1e97fbd34ec6@%3Cdev.commons.apache.org%3E
> >
>
> On 3 February 2017 at 19:05, Matt Sicker  wrote:
>
> > I'm pretty sure you two have had almost this exact conversation before.
> >
> > On 3 February 2017 at 17:41, sebb  wrote:
> >
> >> I don't see the point; it changes only rarely and it would require
> >> extra work to read the data and handle errors.
> >>
> >> On 3 February 2017 at 18:59, Gary Gregory 
> wrote:
> >> > How about externalizing this in a txt file?
> >> >
> >> > Gary
> >> >
> >> > -- Forwarded message --
> >> > From: 
> >> > Date: Fri, Feb 3, 2017 at 10:58 AM
> >> > Subject: svn commit: r1781587 -
> >> > /commons/proper/validator/trunk/src/main/java/org/apache/
> >> commons/validator/routines/IBANValidator.java
> >> > To: comm...@commons.apache.org
> >> >
> >> >
> >> > Author: sebb
> >> > Date: Fri Feb  3 18:58:57 2017
> >> > New Revision: 1781587
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=1781587=rev
> >> > Log:
> >> > Sort by country-code
> >> >
> >> > Modified:
> >> > commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java
> >> >
> >> > Modified: commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java
> >> > URL: http://svn.apache.org/viewvc/commons/proper/validator/
> >> > trunk/src/main/java/org/apache/commons/validator/
> >> >
> routines/IBANValidator.java?rev=1781587=1781586=1781587=diff
> >> > 
> >> > ==
> >> > --- commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java (original)
> >> > +++ commons/proper/validator/trunk/src/main/java/org/
> >> > apache/commons/validator/routines/IBANValidator.java Fri Feb  3
> >> 18:58:57
> >> > 2017
> >> > @@ -94,78 +94,78 @@ public class IBANValidator {
> >> >   */
> >> >
> >> >  private static final Validator[] DEFAULT_FORMATS = {
> >> > -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >> >  ), // Albania
> >> >  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
> >> >  ), // Andorra
> >> > +new Validator("AE", 23, "AE\\d{21}"
> >> >  ), // United Arab Emirates
> >> > +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >> >  ), // Albania
> >> >  new Validator("AT", 20, "AT\\d{18}"
> >> >  ), // Austria
> >> >  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
> >> >   ), // Republic of Azerbaijan
> >> > -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >> >   ), // Bahrain (Kingdom of)
> >> > -new Validator("BE", 16, "BE\\d{14}"
> >> >  ), // Belgium
> >> >  new Validator("BA", 20, "BA\\d{18}"
> >> >  ), // Bosnia and Herzegovina
> >> > -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >> >   ), // Brazil
> >> > +new Validator("BE", 16, "BE\\d{14}"
> >> >  ), // Belgium
> >> >  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9
> >> ]{8}"
> >> >  ), // Bulgaria
> >> > +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >> >   ), // Bahrain (Kingdom of)
> >> > +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >> >   ), // Brazil
> >> > +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
> >> >   ), // Switzerland
> >> >  new Validator("CR", 22, "CR\\d{20}"
> >> >  ), // Costa Rica
> >> > -new Validator("HR", 21, "HR\\d{19}"
> >> >  ), // Croatia
> >> >  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
> >> >  ), // Cyprus
> >> >  new Validator("CZ", 24, "CZ\\d{22}"
> >> >  ), // Czech Republic
> >> > +new Validator("DE", 22, "DE\\d{20}"
> >> >  ), // Germany
> >> >  new Validator("DK", 18, "DK\\d{16}"
> >> >  ), // Denmark
> >> > -new Validator("FO", 18, "FO\\d{16}"
> >> >  ), // Denmark (Faroes)
> >> > -new Validator("GL", 18, "GL\\d{16}"
> >> >  ), // Denmark (Greenland)
> >> >  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
> >> >   ), // Dominican Republic
> >> >  new Validator("EE", 20, "EE\\d{18}"
> >> >  ), // Estonia
> >> > +new Validator("ES", 24, "ES\\d{22}"
> >> >  ), // Spain
> >> >  new Validator("FI", 18, "FI\\d{16}"
> >> >  ), // Finland
> >> > +new Validator("FO", 18, "FO\\d{16}"
> >> >  ), // Denmark (Faroes)
> >> >  new Validator("FR", 27, "FR\\d{12}[A-Z0-9]{11}\\d{2}"
> >> >  ), // France
> >> > +new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
> >> >  ), // United Kingdom
> >> >   

Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-03 Thread Matt Sicker
Yup, found it: <
https://lists.apache.org/thread.html/095664f9bb67602f308cf1a0d492de662992462314eb1e97fbd34ec6@%3Cdev.commons.apache.org%3E
>

On 3 February 2017 at 19:05, Matt Sicker  wrote:

> I'm pretty sure you two have had almost this exact conversation before.
>
> On 3 February 2017 at 17:41, sebb  wrote:
>
>> I don't see the point; it changes only rarely and it would require
>> extra work to read the data and handle errors.
>>
>> On 3 February 2017 at 18:59, Gary Gregory  wrote:
>> > How about externalizing this in a txt file?
>> >
>> > Gary
>> >
>> > -- Forwarded message --
>> > From: 
>> > Date: Fri, Feb 3, 2017 at 10:58 AM
>> > Subject: svn commit: r1781587 -
>> > /commons/proper/validator/trunk/src/main/java/org/apache/
>> commons/validator/routines/IBANValidator.java
>> > To: comm...@commons.apache.org
>> >
>> >
>> > Author: sebb
>> > Date: Fri Feb  3 18:58:57 2017
>> > New Revision: 1781587
>> >
>> > URL: http://svn.apache.org/viewvc?rev=1781587=rev
>> > Log:
>> > Sort by country-code
>> >
>> > Modified:
>> > commons/proper/validator/trunk/src/main/java/org/
>> > apache/commons/validator/routines/IBANValidator.java
>> >
>> > Modified: commons/proper/validator/trunk/src/main/java/org/
>> > apache/commons/validator/routines/IBANValidator.java
>> > URL: http://svn.apache.org/viewvc/commons/proper/validator/
>> > trunk/src/main/java/org/apache/commons/validator/
>> > routines/IBANValidator.java?rev=1781587=1781586=1781587=diff
>> > 
>> > ==
>> > --- commons/proper/validator/trunk/src/main/java/org/
>> > apache/commons/validator/routines/IBANValidator.java (original)
>> > +++ commons/proper/validator/trunk/src/main/java/org/
>> > apache/commons/validator/routines/IBANValidator.java Fri Feb  3
>> 18:58:57
>> > 2017
>> > @@ -94,78 +94,78 @@ public class IBANValidator {
>> >   */
>> >
>> >  private static final Validator[] DEFAULT_FORMATS = {
>> > -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>> >  ), // Albania
>> >  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
>> >  ), // Andorra
>> > +new Validator("AE", 23, "AE\\d{21}"
>> >  ), // United Arab Emirates
>> > +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>> >  ), // Albania
>> >  new Validator("AT", 20, "AT\\d{18}"
>> >  ), // Austria
>> >  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
>> >   ), // Republic of Azerbaijan
>> > -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>> >   ), // Bahrain (Kingdom of)
>> > -new Validator("BE", 16, "BE\\d{14}"
>> >  ), // Belgium
>> >  new Validator("BA", 20, "BA\\d{18}"
>> >  ), // Bosnia and Herzegovina
>> > -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>> >   ), // Brazil
>> > +new Validator("BE", 16, "BE\\d{14}"
>> >  ), // Belgium
>> >  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9
>> ]{8}"
>> >  ), // Bulgaria
>> > +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>> >   ), // Bahrain (Kingdom of)
>> > +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>> >   ), // Brazil
>> > +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
>> >   ), // Switzerland
>> >  new Validator("CR", 22, "CR\\d{20}"
>> >  ), // Costa Rica
>> > -new Validator("HR", 21, "HR\\d{19}"
>> >  ), // Croatia
>> >  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
>> >  ), // Cyprus
>> >  new Validator("CZ", 24, "CZ\\d{22}"
>> >  ), // Czech Republic
>> > +new Validator("DE", 22, "DE\\d{20}"
>> >  ), // Germany
>> >  new Validator("DK", 18, "DK\\d{16}"
>> >  ), // Denmark
>> > -new Validator("FO", 18, "FO\\d{16}"
>> >  ), // Denmark (Faroes)
>> > -new Validator("GL", 18, "GL\\d{16}"
>> >  ), // Denmark (Greenland)
>> >  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
>> >   ), // Dominican Republic
>> >  new Validator("EE", 20, "EE\\d{18}"
>> >  ), // Estonia
>> > +new Validator("ES", 24, "ES\\d{22}"
>> >  ), // Spain
>> >  new Validator("FI", 18, "FI\\d{16}"
>> >  ), // Finland
>> > +new Validator("FO", 18, "FO\\d{16}"
>> >  ), // Denmark (Faroes)
>> >  new Validator("FR", 27, "FR\\d{12}[A-Z0-9]{11}\\d{2}"
>> >  ), // France
>> > +new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
>> >  ), // United Kingdom
>> >  new Validator("GE", 22, "GE\\d{2}[A-Z]{2}\\d{16}"
>> >  ), // Georgia
>> > -new Validator("DE", 22, "DE\\d{20}"
>> >  ), // Germany
>> >  new Validator("GI", 23, "GI\\d{2}[A-Z]{4}[A-Z0-9]{15}"
>> >   ), // Gibraltar
>> > +new Validator("GL", 18, "GL\\d{16}"
>> >  ), // Denmark (Greenland)
>> >  

Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-03 Thread Matt Sicker
I'm pretty sure you two have had almost this exact conversation before.

On 3 February 2017 at 17:41, sebb  wrote:

> I don't see the point; it changes only rarely and it would require
> extra work to read the data and handle errors.
>
> On 3 February 2017 at 18:59, Gary Gregory  wrote:
> > How about externalizing this in a txt file?
> >
> > Gary
> >
> > -- Forwarded message --
> > From: 
> > Date: Fri, Feb 3, 2017 at 10:58 AM
> > Subject: svn commit: r1781587 -
> > /commons/proper/validator/trunk/src/main/java/org/
> apache/commons/validator/routines/IBANValidator.java
> > To: comm...@commons.apache.org
> >
> >
> > Author: sebb
> > Date: Fri Feb  3 18:58:57 2017
> > New Revision: 1781587
> >
> > URL: http://svn.apache.org/viewvc?rev=1781587=rev
> > Log:
> > Sort by country-code
> >
> > Modified:
> > commons/proper/validator/trunk/src/main/java/org/
> > apache/commons/validator/routines/IBANValidator.java
> >
> > Modified: commons/proper/validator/trunk/src/main/java/org/
> > apache/commons/validator/routines/IBANValidator.java
> > URL: http://svn.apache.org/viewvc/commons/proper/validator/
> > trunk/src/main/java/org/apache/commons/validator/
> > routines/IBANValidator.java?rev=1781587=1781586=1781587=diff
> > 
> > ==
> > --- commons/proper/validator/trunk/src/main/java/org/
> > apache/commons/validator/routines/IBANValidator.java (original)
> > +++ commons/proper/validator/trunk/src/main/java/org/
> > apache/commons/validator/routines/IBANValidator.java Fri Feb  3 18:58:57
> > 2017
> > @@ -94,78 +94,78 @@ public class IBANValidator {
> >   */
> >
> >  private static final Validator[] DEFAULT_FORMATS = {
> > -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >  ), // Albania
> >  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
> >  ), // Andorra
> > +new Validator("AE", 23, "AE\\d{21}"
> >  ), // United Arab Emirates
> > +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
> >  ), // Albania
> >  new Validator("AT", 20, "AT\\d{18}"
> >  ), // Austria
> >  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
> >   ), // Republic of Azerbaijan
> > -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >   ), // Bahrain (Kingdom of)
> > -new Validator("BE", 16, "BE\\d{14}"
> >  ), // Belgium
> >  new Validator("BA", 20, "BA\\d{18}"
> >  ), // Bosnia and Herzegovina
> > -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >   ), // Brazil
> > +new Validator("BE", 16, "BE\\d{14}"
> >  ), // Belgium
> >  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9]{8}"
> >  ), // Bulgaria
> > +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
> >   ), // Bahrain (Kingdom of)
> > +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
> >   ), // Brazil
> > +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
> >   ), // Switzerland
> >  new Validator("CR", 22, "CR\\d{20}"
> >  ), // Costa Rica
> > -new Validator("HR", 21, "HR\\d{19}"
> >  ), // Croatia
> >  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
> >  ), // Cyprus
> >  new Validator("CZ", 24, "CZ\\d{22}"
> >  ), // Czech Republic
> > +new Validator("DE", 22, "DE\\d{20}"
> >  ), // Germany
> >  new Validator("DK", 18, "DK\\d{16}"
> >  ), // Denmark
> > -new Validator("FO", 18, "FO\\d{16}"
> >  ), // Denmark (Faroes)
> > -new Validator("GL", 18, "GL\\d{16}"
> >  ), // Denmark (Greenland)
> >  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
> >   ), // Dominican Republic
> >  new Validator("EE", 20, "EE\\d{18}"
> >  ), // Estonia
> > +new Validator("ES", 24, "ES\\d{22}"
> >  ), // Spain
> >  new Validator("FI", 18, "FI\\d{16}"
> >  ), // Finland
> > +new Validator("FO", 18, "FO\\d{16}"
> >  ), // Denmark (Faroes)
> >  new Validator("FR", 27, "FR\\d{12}[A-Z0-9]{11}\\d{2}"
> >  ), // France
> > +new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
> >  ), // United Kingdom
> >  new Validator("GE", 22, "GE\\d{2}[A-Z]{2}\\d{16}"
> >  ), // Georgia
> > -new Validator("DE", 22, "DE\\d{20}"
> >  ), // Germany
> >  new Validator("GI", 23, "GI\\d{2}[A-Z]{4}[A-Z0-9]{15}"
> >   ), // Gibraltar
> > +new Validator("GL", 18, "GL\\d{16}"
> >  ), // Denmark (Greenland)
> >  new Validator("GR", 27, "GR\\d{9}[A-Z0-9]{16}"
> >   ), // Greece
> >  new Validator("GT", 28, "GT\\d{2}[A-Z0-9]{24}"
> >   ), // Guatemala
> > +new Validator("HR", 21, "HR\\d{19}"
> >  ), // Croatia
> >  new Validator("HU", 28, "HU\\d{26}"
> >  ), // Hungary
> > -new 

Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java

2017-02-03 Thread sebb
I don't see the point; it changes only rarely and it would require
extra work to read the data and handle errors.

On 3 February 2017 at 18:59, Gary Gregory  wrote:
> How about externalizing this in a txt file?
>
> Gary
>
> -- Forwarded message --
> From: 
> Date: Fri, Feb 3, 2017 at 10:58 AM
> Subject: svn commit: r1781587 -
> /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
> To: comm...@commons.apache.org
>
>
> Author: sebb
> Date: Fri Feb  3 18:58:57 2017
> New Revision: 1781587
>
> URL: http://svn.apache.org/viewvc?rev=1781587=rev
> Log:
> Sort by country-code
>
> Modified:
> commons/proper/validator/trunk/src/main/java/org/
> apache/commons/validator/routines/IBANValidator.java
>
> Modified: commons/proper/validator/trunk/src/main/java/org/
> apache/commons/validator/routines/IBANValidator.java
> URL: http://svn.apache.org/viewvc/commons/proper/validator/
> trunk/src/main/java/org/apache/commons/validator/
> routines/IBANValidator.java?rev=1781587=1781586=1781587=diff
> 
> ==
> --- commons/proper/validator/trunk/src/main/java/org/
> apache/commons/validator/routines/IBANValidator.java (original)
> +++ commons/proper/validator/trunk/src/main/java/org/
> apache/commons/validator/routines/IBANValidator.java Fri Feb  3 18:58:57
> 2017
> @@ -94,78 +94,78 @@ public class IBANValidator {
>   */
>
>  private static final Validator[] DEFAULT_FORMATS = {
> -new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>  ), // Albania
>  new Validator("AD", 24, "AD\\d{10}[A-Z0-9]{12}"
>  ), // Andorra
> +new Validator("AE", 23, "AE\\d{21}"
>  ), // United Arab Emirates
> +new Validator("AL", 28, "AL\\d{10}[A-Z0-9]{16}"
>  ), // Albania
>  new Validator("AT", 20, "AT\\d{18}"
>  ), // Austria
>  new Validator("AZ", 28, "AZ\\d{2}[A-Z]{4}[A-Z0-9]{20}"
>   ), // Republic of Azerbaijan
> -new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>   ), // Bahrain (Kingdom of)
> -new Validator("BE", 16, "BE\\d{14}"
>  ), // Belgium
>  new Validator("BA", 20, "BA\\d{18}"
>  ), // Bosnia and Herzegovina
> -new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>   ), // Brazil
> +new Validator("BE", 16, "BE\\d{14}"
>  ), // Belgium
>  new Validator("BG", 22, "BG\\d{2}[A-Z]{4}\\d{6}[A-Z0-9]{8}"
>  ), // Bulgaria
> +new Validator("BH", 22, "BH\\d{2}[A-Z]{4}[A-Z0-9]{14}"
>   ), // Bahrain (Kingdom of)
> +new Validator("BR", 29, "BR\\d{25}[A-Z]{1}[A-Z0-9]{1}"
>   ), // Brazil
> +new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
>   ), // Switzerland
>  new Validator("CR", 22, "CR\\d{20}"
>  ), // Costa Rica
> -new Validator("HR", 21, "HR\\d{19}"
>  ), // Croatia
>  new Validator("CY", 28, "CY\\d{10}[A-Z0-9]{16}"
>  ), // Cyprus
>  new Validator("CZ", 24, "CZ\\d{22}"
>  ), // Czech Republic
> +new Validator("DE", 22, "DE\\d{20}"
>  ), // Germany
>  new Validator("DK", 18, "DK\\d{16}"
>  ), // Denmark
> -new Validator("FO", 18, "FO\\d{16}"
>  ), // Denmark (Faroes)
> -new Validator("GL", 18, "GL\\d{16}"
>  ), // Denmark (Greenland)
>  new Validator("DO", 28, "DO\\d{2}[A-Z0-9]{4}\\d{20}"
>   ), // Dominican Republic
>  new Validator("EE", 20, "EE\\d{18}"
>  ), // Estonia
> +new Validator("ES", 24, "ES\\d{22}"
>  ), // Spain
>  new Validator("FI", 18, "FI\\d{16}"
>  ), // Finland
> +new Validator("FO", 18, "FO\\d{16}"
>  ), // Denmark (Faroes)
>  new Validator("FR", 27, "FR\\d{12}[A-Z0-9]{11}\\d{2}"
>  ), // France
> +new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
>  ), // United Kingdom
>  new Validator("GE", 22, "GE\\d{2}[A-Z]{2}\\d{16}"
>  ), // Georgia
> -new Validator("DE", 22, "DE\\d{20}"
>  ), // Germany
>  new Validator("GI", 23, "GI\\d{2}[A-Z]{4}[A-Z0-9]{15}"
>   ), // Gibraltar
> +new Validator("GL", 18, "GL\\d{16}"
>  ), // Denmark (Greenland)
>  new Validator("GR", 27, "GR\\d{9}[A-Z0-9]{16}"
>   ), // Greece
>  new Validator("GT", 28, "GT\\d{2}[A-Z0-9]{24}"
>   ), // Guatemala
> +new Validator("HR", 21, "HR\\d{19}"
>  ), // Croatia
>  new Validator("HU", 28, "HU\\d{26}"
>  ), // Hungary
> -new Validator("IS", 26, "IS\\d{24}"
>  ), // Iceland
>  new Validator("IE", 22, "IE\\d{2}[A-Z]{4}\\d{14}"
>  ), // Ireland
>  new Validator("IL", 23, "IL\\d{21}"
>  ), // Israel
> +new Validator("IS", 26, "IS\\d{24}"
>  ), // Iceland
>  new Validator("IT", 27, "IT\\d{2}[A-Z]{1}\\d{10}[A-Z0-9]{12}"
>  ), // Italy
>  new