From 860728b11eccc555e3bab8dbb9e69e93ad9917f9 Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Thu, 26 Dec 2024 22:35:19 +0100 Subject: [PATCH] Add IBANValidator/IBANCheckDigit to package documentation --- src/changes/changes.xml | 1 + .../validator/routines/package-info.java | 45 ++++++++++++++----- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e2927c748..d7800d264 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -64,6 +64,7 @@ The type attribute can be add,update,fix,remove. + Add IBANValidator/IBANCheckDigit to package documentation Locale-dependent tests: calculate expected results as output varies between JVMs Locale default tests: ensure original is restored on failure Fix order of actual and expected parameters in assertEquals() #246. diff --git a/src/main/java/org/apache/commons/validator/routines/package-info.java b/src/main/java/org/apache/commons/validator/routines/package-info.java index a0d8239cd..15c2c6553 100644 --- a/src/main/java/org/apache/commons/validator/routines/package-info.java +++ b/src/main/java/org/apache/commons/validator/routines/package-info.java @@ -45,11 +45,12 @@ *
  • 4.2 Regular Expression validation
  • *
  • 4.3 Check Digit Validation/Calculation
  • *
  • 4.4 General Code Validation
  • - *
  • 4.5 ISBN Validation
  • - *
  • 4.6 IP Address Validation
  • - *
  • 4.7 Email Address Validation
  • - *
  • 4.8 URL Validation
  • - *
  • 4.9 Domain Name Validation
  • + *
  • 4.5 IBAN Validation
  • + *
  • 4.6 ISBN Validation
  • + *
  • 4.7 IP Address Validation
  • + *
  • 4.8 Email Address Validation
  • + *
  • 4.9 URL Validation
  • + *
  • 4.10 Domain Name Validation
  • * * * @@ -387,6 +388,7 @@ * check digits (i.e. EAN/UPC, credit card, ISBN). *
  • Code Validation - provides generic * code validation - format, minimum/maximum length and check digit.
  • + *
  • IBAN Validation - provides International Bank Account Number validation.
  • *
  • ISBN Validation - provides ISBN-10 * and ISBN-13 validation.
  • *
  • IP Address Validation - provides IPv4 address @@ -494,6 +496,8 @@ * for CUSIP (North American Securities) check digit calculation.
  • *
  • EAN13CheckDigit * for EAN-13, UPC, ISBN-13 check digit calculation.
  • + *
  • IBANCheckDigit + * for IBAN check digit calculation.
  • *
  • ISBNCheckDigit * for ISBN-10 and ISBN-13 check digit calculation.
  • *
  • ISBN10CheckDigit @@ -571,8 +575,29 @@ * ... // invalid * } * + * + *

    4.5 IBAN validation

    + *

    + * IBANValidator provides validation of + * International Bank Account Number. + *

    + *

    + * The validator includes a default set of formats derived from the IBAN registry at + * https://www.swift.com/standards/data-standards/iban. + *

    + *

    + * For example: + *

    + *
    + * // Get an IBANValidator
    + * IBANValidator validator = IBANValidator.getInstance();
    + * // Validate an IBAN
    + * if (!validator.isValid(candidateIBAN)) {
    + * ... // invalid
    + * }
    + * 
    * - *

    4.5 ISBN validation

    + *

    4.6 ISBN validation

    *

    * ISBNValidator provides ISBN-10 * and ISBN-13 validation and can optionally convert @@ -623,7 +648,7 @@ * String code = ISBNValidator.getInstance(false).validate(code); * * - *

    4.6 IP Address Validation

    + *

    4.7 IP Address Validation

    *

    * InetAddressValidator provides * IPv4 address validation. @@ -640,7 +665,7 @@ * } * * - *

    4.7 Email Address Validation

    + *

    4.8 Email Address Validation

    *

    * EmailValidator provides email address * validation according to RFC 822 standards. @@ -660,7 +685,7 @@ * } * * - *

    4.8 URL Validation

    + *

    4.9 URL Validation

    *

    * UrlValidator provides URL validation by * checking the scheme, authority, path, query, and fragment in turn. Clients @@ -696,7 +721,7 @@ * } * * - *

    4.9 Domain Name Validation

    + *

    4.10 Domain Name Validation

    *

    * DomainValidator provides validation of Internet * domain names as specified by RFC1034/RFC1123 and according to the IANA-recognized