Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
seventhmoon committed Apr 12, 2021
2 parents 3a09ec8 + e67fb3d commit c0009a0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ Add it in your root build.gradle at the end of repositories:
Step 2. Add the dependency

dependencies {
implementation 'com.github.seventhmoon:hkid-validator:1.0.0'
implementation 'com.github.seventhmoon:hkid-validator:1.0.1'
}
### How to use
try {
HkidValidator.calcCheckDigit("A123456") //calculate the check digit in ( )
} catch (e : IllegalArgumentException){
// input is not in a valid format
}

HkidValidator.isValid("A123456",'3') // true, valid
HkidValidator.isValid("A123456",'2') // false, invalid

0 comments on commit c0009a0

Please sign in to comment.