commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: svn commit: r1781587 - /commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
Date Sat, 04 Feb 2017 01:05:52 GMT
I'm pretty sure you two have had almost this exact conversation before.

On 3 February 2017 at 17:41, sebb <sebbaz@gmail.com> 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 <garydgregory@gmail.com> wrote:
> > How about externalizing this in a txt file?
> >
> > Gary
> >
> > ---------- Forwarded message ----------
> > From: <sebb@apache.org>
> > 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: commits@commons.apache.org
> >
> >
> > Author: sebb
> > Date: Fri Feb  3 18:58:57 2017
> > New Revision: 1781587
> >
> > URL: http://svn.apache.org/viewvc?rev=1781587&view=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&r1=1781586&r2=1781587&view=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 Validator("JO", 30, "JO\\d{2}[A-Z]{4}\\d{4}[A-Z0-
> 9]{18}"
> >   ), // Jordan
> > -            new Validator("KZ", 20, "KZ\\d{5}[A-Z0-9]{13}"
> >   ), // Kazakhstan
> > -            new Validator("XK", 20, "XK\\d{18}"
> >  ), // Republic of Kosovo
> >              new Validator("KW", 30, "KW\\d{2}[A-Z]{4}[A-Z0-9]{22}"
> >   ), // Kuwait
> > -            new Validator("LV", 21, "LV\\d{2}[A-Z]{4}[A-Z0-9]{13}"
> >   ), // Latvia
> > +            new Validator("KZ", 20, "KZ\\d{5}[A-Z0-9]{13}"
> >   ), // Kazakhstan
> >              new Validator("LB", 28, "LB\\d{6}[A-Z0-9]{20}"
> >   ), // Lebanon
> > +            new Validator("LC", 32, "LC\\d{2}[A-Z]{4}\\d{24}"
> >  ), // Saint Lucia
> >              new Validator("LI", 21, "LI\\d{7}[A-Z0-9]{12}"
> >   ), // Liechtenstein (Principality of)
> >              new Validator("LT", 20, "LT\\d{18}"
> >  ), // Lithuania
> >              new Validator("LU", 20, "LU\\d{5}[A-Z0-9]{13}"
> >   ), // Luxembourg
> > +            new Validator("LV", 21, "LV\\d{2}[A-Z]{4}[A-Z0-9]{13}"
> >   ), // Latvia
> > +            new Validator("MC", 27, "MC\\d{12}[A-Z0-9]{11}\\d{2}"
> >  ), // Monaco
> > +            new Validator("MD", 24, "MD\\d{2}[A-Z0-9]{20}"
> >   ), // Moldova
> > +            new Validator("ME", 22, "ME\\d{20}"
> >  ), // Montenegro
> >              new Validator("MK", 19, "MK\\d{5}[A-Z0-9]{10}\\d{2}"
> >   ), // Macedonia, Former Yugoslav Republic of
> > -            new Validator("MT", 31, "MT\\d{2}[A-Z]{4}\\d{5}[A-Z0-
> 9]{18}"
> >   ), // Malta
> >              new Validator("MR", 27, "MR13\\d{23}"
> >  ), // Mauritania
> > +            new Validator("MT", 31, "MT\\d{2}[A-Z]{4}\\d{5}[A-Z0-
> 9]{18}"
> >   ), // Malta
> >              new Validator("MU", 30, "MU\\d{2}[A-Z]{4}\\d{19}[A-Z]{3}"
> >  ), // Mauritius
> > -            new Validator("MD", 24, "MD\\d{2}[A-Z0-9]{20}"
> >   ), // Moldova
> > -            new Validator("MC", 27, "MC\\d{12}[A-Z0-9]{11}\\d{2}"
> >  ), // Monaco
> > -            new Validator("ME", 22, "ME\\d{20}"
> >  ), // Montenegro
> >              new Validator("NL", 18, "NL\\d{2}[A-Z]{4}\\d{10}"
> >  ), // The Netherlands
> >              new Validator("NO", 15, "NO\\d{13}"
> >  ), // Norway
> >              new Validator("PK", 24, "PK\\d{2}[A-Z]{4}[A-Z0-9]{16}"
> >   ), // Pakistan
> > -            new Validator("PS", 29, "PS\\d{2}[A-Z]{4}[A-Z0-9]{21}"
> >   ), // Palestine, State of
> >              new Validator("PL", 28, "PL\\d{26}"
> >  ), // Poland
> > +            new Validator("PS", 29, "PS\\d{2}[A-Z]{4}[A-Z0-9]{21}"
> >   ), // Palestine, State of
> >              new Validator("PT", 25, "PT\\d{23}"
> >  ), // Portugal
> >              new Validator("QA", 29, "QA\\d{2}[A-Z]{4}[A-Z0-9]{21}"
> >   ), // Qatar
> >              new Validator("RO", 24, "RO\\d{2}[A-Z]{4}[A-Z0-9]{16}"
> >   ), // Romania
> > -            new Validator("LC", 32, "LC\\d{2}[A-Z]{4}\\d{24}"
> >  ), // Saint Lucia
> > -            new Validator("SM", 27, "SM\\d{2}[A-Z]{1}\\d{10}[A-Z0-
> 9]{12}"
> >  ), // San Marino
> > -            new Validator("ST", 25, "ST\\d{23}"
> >  ), // Sao Tome And Principe
> > -            new Validator("SA", 24, "SA\\d{4}[A-Z0-9]{18}"
> >   ), // Saudi Arabia
> >              new Validator("RS", 22, "RS\\d{20}"
> >  ), // Serbia
> > +            new Validator("SA", 24, "SA\\d{4}[A-Z0-9]{18}"
> >   ), // Saudi Arabia
> >              new Validator("SC", 31, "SC\\d{2}[A-Z]{4}\\d{20}[A-Z]{3}"
> >  ), // Seychelles
> > -            new Validator("SK", 24, "SK\\d{22}"
> >  ), // Slovak Republic
> > -            new Validator("SI", 19, "SI\\d{17}"
> >  ), // Slovenia
> > -            new Validator("ES", 24, "ES\\d{22}"
> >  ), // Spain
> >              new Validator("SE", 24, "SE\\d{22}"
> >  ), // Sweden
> > -            new Validator("CH", 21, "CH\\d{7}[A-Z0-9]{12}"
> >   ), // Switzerland
> > +            new Validator("SI", 19, "SI\\d{17}"
> >  ), // Slovenia
> > +            new Validator("SK", 24, "SK\\d{22}"
> >  ), // Slovak Republic
> > +            new Validator("SM", 27, "SM\\d{2}[A-Z]{1}\\d{10}[A-Z0-
> 9]{12}"
> >  ), // San Marino
> > +            new Validator("ST", 25, "ST\\d{23}"
> >  ), // Sao Tome And Principe
> >              new Validator("TL", 23, "TL\\d{21}"
> >  ), // Timor-Leste
> >              new Validator("TN", 24, "TN59\\d{20}"
> >  ), // Tunisia
> >              new Validator("TR", 26, "TR\\d{8}[A-Z0-9]{16}"
> >   ), // Turkey
> >              new Validator("UA", 29, "UA\\d{8}[A-Z0-9]{19}"
> >   ), // Ukraine
> > -            new Validator("AE", 23, "AE\\d{21}"
> >  ), // United Arab Emirates
> > -            new Validator("GB", 22, "GB\\d{2}[A-Z]{4}\\d{14}"
> >  ), // United Kingdom
> >              new Validator("VG", 24, "VG\\d{2}[A-Z]{4}\\d{16}"
> >  ), // Virgin Islands, British
> > +            new Validator("XK", 20, "XK\\d{18}"
> >  ), // Republic of Kosovo
> >      };
> >
> >      /** The singleton instance which uses the default formats */
> >
> >
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> > JUnit in Action, Second Edition
> > <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
> >
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> > Spring Batch in Action
> > <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> > <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message