Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change CASNumberCheckDigit and ECNumberCheckDigit, add ECIndexNumberValidator #235

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

homebeaver
Copy link
Contributor

routines in package org.apache.commons.validator.routines.checkdigit
do not validate the input for length or syntax. This is documented in package-info

Respected this idea I change CASNumberCheckDigit and ECNumberCheckDigit.

And provide CASNumberValidator and ECNumberValidator which validates the syntax.

I also add a Validator for ECIndexNumber, a unique nine-digit identifier that is assigned to hazardous chemical substances.

regards EUGen

<b>do not validate</b> the input for length or syntax.

So I change CASNumberCheckDigit and ECNumberCheckDigit.

And provide CASNumberValidator and ECNumberValidator which validates the
syntax.
toCheckDigit and toInt

which handles 'X' converted to 10, resp. from 10

This methods can be used in ISBN10CheckDigit, ISSNCheckDigit
and ECIndexNumberCheckDigit
The European Community index number is a unique nine-digit identifier
that is assigned to hazardous chemical substances.
Conflicts:
	src/main/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigit.java
	src/main/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigit.java
	src/test/java/org/apache/commons/validator/routines/checkdigit/CASNumberCheckDigitTest.java
	src/test/java/org/apache/commons/validator/routines/checkdigit/ECNumberCheckDigitTest.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant