commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Pemberton <niall.pember...@gmail.com>
Subject Re: [VALIDATOR] CheckDigit implementation for German identity cards?
Date Sat, 07 May 2016 23:05:57 GMT
On Fri, May 6, 2016 at 9:33 AM, sebb <sebbaz@gmail.com> wrote:

> On 5 May 2016 at 20:46, Benedikt Ritter <britter@apache.org> wrote:
> > Benedikt Ritter <britter@apache.org> schrieb am Di., 3. Mai 2016 um
> > 22:49 Uhr:
> >
> >> Hello,
> >>
> >> I have the need for a validator implementation that can check German
> >> identity card numbers. It's pretty simple to implement something like
> this
> >> using ModulusCheckDigit. Now I'm wondering whether this would be a good
> >> addition for [validator]. It is specific to German identity cards, but
> >> maybe we could start an idcard package which contains routine for
> different
> >> country identity cards.
> >>
> >> If this doesn't belong into [validator] I'll probably publish it via my
> >> github account :-)
> >>
> >
> > A CheckDigit implementation for German identity card numbers would look
> > like this:
> https://gist.github.com/britter/ff959c42cab142a828247ce0673f6215
>
> Looks like some/most of the code could be used in other check digit
> implementations.
> In which case the routines should be pushed up into a superclass and
> the German version could just be a constant instance.
> As is done with the bank cards.
>

Yes, a generic "Modulus 10" Check Digit implementation could do this. I've
created the following ticket with an implementation attached:

https://issues.apache.org/jira/browse/VALIDATOR-394

Niall


>
> >
> >>
> >> Best regards,
> >> Benedikt
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

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