This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-validator.git
The following commit(s) were added to refs/heads/master by this push:
new fa0d917d Javadoc
fa0d917d is described below
commit fa0d917d5e05d63394312ec11947a181056a24da
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Jun 5 08:32:31 2026 -0400
Javadoc
---
.../routines/AbstractCalendarValidator.java | 50 ++++++++--------
.../routines/AbstractFormatValidator.java | 40 ++++++-------
.../routines/AbstractNumberValidator.java | 26 ++++----
.../validator/routines/BigDecimalValidator.java | 16 ++---
.../validator/routines/BigIntegerValidator.java | 14 ++---
.../commons/validator/routines/ByteValidator.java | 18 +++---
.../validator/routines/CalendarValidator.java | 34 +++++------
.../commons/validator/routines/CodeValidator.java | 6 ++
.../validator/routines/CreditCardValidator.java | 1 +
.../validator/routines/CurrencyValidator.java | 4 +-
.../commons/validator/routines/DateValidator.java | 34 +++++------
.../validator/routines/DomainValidator.java | 2 +-
.../validator/routines/DoubleValidator.java | 14 ++---
.../commons/validator/routines/EmailValidator.java | 4 +-
.../commons/validator/routines/FloatValidator.java | 30 +++++-----
.../commons/validator/routines/IBANValidator.java | 69 ++++++++++------------
.../commons/validator/routines/ISBNValidator.java | 17 +++++-
.../validator/routines/InetAddressValidator.java | 2 +-
.../validator/routines/IntegerValidator.java | 14 ++---
.../commons/validator/routines/LongValidator.java | 14 ++---
.../validator/routines/PercentValidator.java | 4 +-
.../commons/validator/routines/ShortValidator.java | 18 +++---
.../commons/validator/routines/TimeValidator.java | 28 ++++-----
.../commons/validator/routines/UrlValidator.java | 6 +-
24 files changed, 241 insertions(+), 224 deletions(-)
diff --git
a/src/main/java/org/apache/commons/validator/routines/AbstractCalendarValidator.java
b/src/main/java/org/apache/commons/validator/routines/AbstractCalendarValidator.java
index 7ee04458..a2b2e9a2 100644
---
a/src/main/java/org/apache/commons/validator/routines/AbstractCalendarValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/AbstractCalendarValidator.java
@@ -27,7 +27,7 @@ import java.util.TimeZone;
import org.apache.commons.validator.GenericValidator;
/**
- * <p>Abstract class for Date/Time/Calendar validation.</p>
+ * Abstract class for Date/Time/Calendar validation.
*
* <p>This is a <em>base</em> class for building Date / Time
* Validators using format parsing.</p>
@@ -64,7 +64,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Compares the field from two calendars indicating whether the field
for the
+ * Compares the field from two calendars indicating whether the field for
the
* first calendar is equal to, less than or greater than the field from
the
* second calendar.
*
@@ -79,7 +79,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Calculate the quarter for the specified Calendar.</p>
+ * Calculate the quarter for the specified Calendar.
*
* @param calendar The Calendar value.
* @param monthOfFirstQuarter The month that the first quarter starts.
@@ -102,8 +102,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Compares a calendar value to another, indicating whether it is
- * equal, less than or more than at a specified level.</p>
+ * Compares a calendar value to another, indicating whether it is
+ * equal, less than or more than at a specified level.
*
* @param value The Calendar value.
* @param compare The {@link Calendar} to check the value against.
@@ -158,8 +158,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Compares a calendar's quarter value to another, indicating whether
it is
- * equal, less than or more than the specified quarter.</p>
+ * Compares a calendar's quarter value to another, indicating whether it is
+ * equal, less than or more than the specified quarter.
*
* @param value The Calendar value.
* @param compare The {@link Calendar} to check the value against.
@@ -174,8 +174,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Compares a calendar time value to another, indicating whether it is
- * equal, less than or more than at a specified level.</p>
+ * Compares a calendar time value to another, indicating whether it is
+ * equal, less than or more than at a specified level.
*
* @param value The Calendar value.
* @param compare The {@link Calendar} to check the value against.
@@ -217,7 +217,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format a value with the specified {@code DateFormat}.</p>
+ * Format a value with the specified {@code DateFormat}.
*
* @param value The value to be formatted.
* @param formatter The Format to use.
@@ -235,8 +235,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format an object into a {@link String} using
- * the specified Locale.</p>
+ * Format an object into a {@link String} using
+ * the specified Locale.
*
* @param value The value validation is being performed on.
* @param locale The locale to use for the Format.
@@ -249,7 +249,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format an object using the specified pattern and/or
+ * Format an object using the specified pattern and/or
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -263,7 +263,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format an object using the specified pattern and/or
+ * Format an object using the specified pattern and/or
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -284,8 +284,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format an object into a {@link String} using
- * the specified pattern.</p>
+ * Format an object into a {@link String} using
+ * the specified pattern.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to format the value.
@@ -298,8 +298,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Format an object into a {@link String} using
- * the default Locale.</p>
+ * Format an object into a {@link String} using
+ * the default Locale.
*
* @param value The value validation is being performed on.
* @param timeZone The Time Zone used to format the date,
@@ -311,7 +311,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Returns a {@code DateFormat} for the specified Locale.</p>
+ * Returns a {@code DateFormat} for the specified Locale.
*
* @param locale The locale a {@code DateFormat} is required for,
* system default if null.
@@ -344,8 +344,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Returns a {@code DateFormat} for the specified <em>pattern</em>
- * and/or {@link Locale}.</p>
+ * Returns a {@code DateFormat} for the specified <em>pattern</em>
+ * and/or {@link Locale}.
*
* @param pattern The pattern used to validate the value against or
* {@code null} to use the default for the {@link Locale}.
@@ -369,7 +369,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Validate using the specified {@link Locale}.
+ * Validate using the specified {@link Locale}.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to format the value.
@@ -382,7 +382,7 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Checks if the value is valid against a specified pattern.</p>
+ * Checks if the value is valid against a specified pattern.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to validate the value against, or the
@@ -406,8 +406,8 @@ public abstract class AbstractCalendarValidator extends
AbstractFormatValidator
}
/**
- * <p>Process the parsed value, performing any further validation
- * and type conversion required.</p>
+ * rocess the parsed value, performing any further validation
+ * and type conversion required.
*
* @param value The parsed object created.
* @param formatter The Format used to parse the value with.
diff --git
a/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
b/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
index e051d17c..60d78ff4 100644
---
a/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/AbstractFormatValidator.java
@@ -22,7 +22,7 @@ import java.text.ParsePosition;
import java.util.Locale;
/**
- * <p>Abstract class for <em>Format</em> based Validation.</p>
+ * Abstract class for <em>Format</em> based Validation.
*
* <p>This is a <em>base</em> class for building Date and Number
* Validators using format parsing.</p>
@@ -49,8 +49,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Format an object into a {@link String} using
- * the default Locale.</p>
+ * Format an object into a {@link String} using
+ * the default Locale.
*
* @param value The value validation is being performed on.
* @return The value formatted as a {@link String}.
@@ -60,7 +60,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Format a value with the specified {@code Format}.</p>
+ * Format a value with the specified {@code Format}.
*
* @param value The value to be formatted.
* @param formatter The Format to use.
@@ -71,8 +71,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Format an object into a {@link String} using
- * the specified Locale.</p>
+ * Format an object into a {@link String} using
+ * the specified Locale.
*
* @param value The value validation is being performed on.
* @param locale The locale to use for the Format.
@@ -83,8 +83,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Format an object into a {@link String} using
- * the specified pattern.</p>
+ * Format an object into a {@link String} using
+ * the specified pattern.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to format the value.
@@ -95,7 +95,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Format an object using the specified pattern and/or
+ * Format an object using the specified pattern and/or
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -108,8 +108,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Returns a {@code Format} for the specified <em>pattern</em>
- * and/or {@link Locale}.</p>
+ * Returns a {@code Format} for the specified <em>pattern</em>
+ * and/or {@link Locale}.
*
* @param pattern The pattern used to validate the value against or
* {@code null} to use the default for the {@link Locale}.
@@ -119,8 +119,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
protected abstract Format getFormat(String pattern, Locale locale);
/**
- * <p>Indicates whether validated values should adhere
- * strictly to the {@code Format} used.</p>
+ * Indicates whether validated values should adhere
+ * strictly to the {@code Format} used.
*
* <p>Typically implementations of {@code Format}
* ignore invalid characters at the end of the value
@@ -140,7 +140,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Validate using the default {@link Locale}.
+ * Validate using the default {@link Locale}.
*
* @param value The value validation is being performed on.
* @return {@code true} if the value is valid.
@@ -150,7 +150,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Validate using the specified {@link Locale}.
+ * Validate using the specified {@link Locale}.
*
* @param value The value validation is being performed on.
* @param locale The locale to use for the Format, defaults to the default
@@ -161,7 +161,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Validate using the specified <em>pattern</em>.
+ * Validate using the specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to validate the value against.
@@ -172,7 +172,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Validate using the specified pattern and/or {@link Locale}.
+ * Validate using the specified pattern and/or {@link Locale}.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to format the value.
@@ -182,7 +182,7 @@ public abstract class AbstractFormatValidator implements
Serializable {
public abstract boolean isValid(String value, String pattern, Locale
locale);
/**
- * <p>Parse the value with the specified {@code Format}.</p>
+ * Parse the value with the specified {@code Format}.
*
* @param value The value to be parsed.
* @param formatter The Format to parse the value with.
@@ -202,8 +202,8 @@ public abstract class AbstractFormatValidator implements
Serializable {
}
/**
- * <p>Process the parsed value, performing any further validation
- * and type conversion required.</p>
+ * Process the parsed value, performing any further validation
+ * and type conversion required.
*
* @param value The parsed object created.
* @param formatter The Format used to parse the value with.
diff --git
a/src/main/java/org/apache/commons/validator/routines/AbstractNumberValidator.java
b/src/main/java/org/apache/commons/validator/routines/AbstractNumberValidator.java
index 8542c25a..90a76626 100644
---
a/src/main/java/org/apache/commons/validator/routines/AbstractNumberValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/AbstractNumberValidator.java
@@ -25,7 +25,7 @@ import java.util.Locale;
import org.apache.commons.validator.GenericValidator;
/**
- * <p>Abstract class for Number Validation.</p>
+ * Abstract class for Number Validation.
*
* <p>This is a <em>base</em> class for building Number
* Validators using format parsing.</p>
@@ -73,7 +73,7 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Returns the <em>multiplier</em> of the {@code NumberFormat}.</p>
+ * Returns the <em>multiplier</em> of the {@code NumberFormat}.
*
* @param format The {@code NumberFormat} to determine the
* multiplier of.
@@ -106,7 +106,7 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Returns a {@code NumberFormat} for the specified Locale.</p>
+ * Returns a {@code NumberFormat} for the specified Locale.
*
* @param locale The locale a {@code NumberFormat} is required for,
* system default if null.
@@ -144,8 +144,8 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Returns a {@code NumberFormat} for the specified <em>pattern</em>
- * and/or {@link Locale}.</p>
+ * Returns a {@code NumberFormat} for the specified <em>pattern</em>
+ * and/or {@link Locale}.
*
* @param pattern The pattern used to validate the value against or
* {@code null} to use the default for the {@link Locale}.
@@ -171,8 +171,8 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Indicates the type of {@code NumberFormat} created
- * by this validator instance.</p>
+ * Indicates the type of {@code NumberFormat} created
+ * by this validator instance.
*
* @return the format type created.
*/
@@ -181,8 +181,8 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Indicates whether the number being validated is
- * a decimal or integer.</p>
+ * Indicates whether the number being validated is
+ * a decimal or integer.
*
* @return {@code true} if decimals are allowed
* or {@code false} if the number is an integer.
@@ -205,7 +205,7 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Validate using the specified {@link Locale}.</p>
+ * Validate using the specified {@link Locale}.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to validate the value against, or the
@@ -249,7 +249,7 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Parse the value using the specified pattern.</p>
+ * Parse the value using the specified pattern.
*
* @param value The value validation is being performed on.
* @param pattern The pattern used to validate the value against, or the
@@ -268,8 +268,8 @@ public abstract class AbstractNumberValidator extends
AbstractFormatValidator {
}
/**
- * <p>Process the parsed value, performing any further validation
- * and type conversion required.</p>
+ * Process the parsed value, performing any further validation
+ * and type conversion required.
*
* @param value The parsed object created.
* @param formatter The Format used to parse the value with.
diff --git
a/src/main/java/org/apache/commons/validator/routines/BigDecimalValidator.java
b/src/main/java/org/apache/commons/validator/routines/BigDecimalValidator.java
index f5617bd2..c029330b 100644
---
a/src/main/java/org/apache/commons/validator/routines/BigDecimalValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/BigDecimalValidator.java
@@ -22,7 +22,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>BigDecimal Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).</p>
+ * <strong>BigDecimal Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -88,7 +88,7 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting.</p>
+ * Construct an instance with the specified strict setting.
*
* @param strict {@code true} if strict
* {@code Format} parsing should be used.
@@ -98,8 +98,8 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -188,7 +188,7 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigDecimal} using the default
+ * Validate/convert a {@code BigDecimal} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -200,7 +200,7 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigDecimal} using the
+ * Validate/convert a {@code BigDecimal} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -212,7 +212,7 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigDecimal} using the
+ * Validate/convert a {@code BigDecimal} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -225,7 +225,7 @@ public class BigDecimalValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigDecimal} using the
+ * Validate/convert a {@code BigDecimal} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java
b/src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java
index 02c1e4a9..27c44735 100644
---
a/src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java
@@ -22,7 +22,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>BigInteger Validation</strong> and Conversion routines ({@code
java.math.BigInteger}).</p>
+ * <strong>BigInteger Validation</strong> and Conversion routines ({@code
java.math.BigInteger}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -86,8 +86,8 @@ public class BigIntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -161,7 +161,7 @@ public class BigIntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigInteger} using the default
+ * Validate/convert a {@code BigInteger} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -173,7 +173,7 @@ public class BigIntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigInteger} using the
+ * Validate/convert a {@code BigInteger} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -185,7 +185,7 @@ public class BigIntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigInteger} using the
+ * Validate/convert a {@code BigInteger} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -197,7 +197,7 @@ public class BigIntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code BigInteger} using the
+ * Validate/convert a {@code BigInteger} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/ByteValidator.java
b/src/main/java/org/apache/commons/validator/routines/ByteValidator.java
index 253a9567..33df8098 100644
--- a/src/main/java/org/apache/commons/validator/routines/ByteValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/ByteValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Byte Validation</strong> and Conversion routines ({@link
Byte}).</p>
+ * <strong>Byte Validation</strong> and Conversion routines ({@link Byte}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -85,8 +85,8 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -184,8 +184,8 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Perform further validation and convert the {@code Number} to
- * a {@code Byte}.</p>
+ * Perform further validation and convert the {@code Number} to
+ * a {@code Byte}.
*
* @param value The parsed {@code Number} object created.
* @param formatter The Format used to parse the value with.
@@ -207,7 +207,7 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Byte} using the default
+ * Validate/convert a {@code Byte} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -219,7 +219,7 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Byte} using the
+ * Validate/convert a {@code Byte} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -231,7 +231,7 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Byte} using the
+ * Validate/convert a {@code Byte} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -243,7 +243,7 @@ public class ByteValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Byte} using the
+ * Validate/convert a {@code Byte} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/CalendarValidator.java
b/src/main/java/org/apache/commons/validator/routines/CalendarValidator.java
index 5e22ca33..03ed2f38 100644
--- a/src/main/java/org/apache/commons/validator/routines/CalendarValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/CalendarValidator.java
@@ -23,7 +23,7 @@ import java.util.Locale;
import java.util.TimeZone;
/**
- * <p><strong>Calendar Validation</strong> and Conversion routines ({@code
java.util.Calendar}).</p>
+ * <strong>Calendar Validation</strong> and Conversion routines ({@code
java.util.Calendar}).
*
* <p>This validator provides a number of methods for validating/converting
* a {@link String} date value to a {@code java.util.Calendar} using
@@ -91,7 +91,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
private static final CalendarValidator VALIDATOR = new CalendarValidator();
/**
- * <p>Adjusts a Calendar's value to a different TimeZone.</p>
+ * Adjusts a Calendar's value to a different TimeZone.
*
* @param value The value to adjust.
* @param timeZone The new time zone to use to adjust the Calendar to.
@@ -140,7 +140,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Dates (day, month and year - not time).</p>
+ * Compare Dates (day, month and year - not time).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -153,7 +153,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Months (month and year).</p>
+ * Compare Months (month and year).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -166,7 +166,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Quarters (quarter and year).</p>
+ * Compare Quarters (quarter and year).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to check the value against.
@@ -179,7 +179,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Quarters (quarter and year).</p>
+ * Compare Quarters (quarter and year).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -194,7 +194,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Weeks (week and year).</p>
+ * Compare Weeks (week and year).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -207,7 +207,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Years.</p>
+ * Compare Years.
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -220,7 +220,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Convert the parsed {@code Date} to a {@link Calendar}.</p>
+ * Convert the parsed {@code Date} to a {@link Calendar}.
*
* @param value The parsed {@code Date} object created.
* @param formatter The Format used to parse the value with.
@@ -232,7 +232,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the default
+ * Validate/convert a {@link Calendar} using the default
* {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -244,7 +244,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* {@link Locale} and default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -256,7 +256,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -269,7 +269,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* <em>pattern</em> and default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -281,7 +281,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified pattern
+ * Validate/convert a {@link Calendar} using the specified pattern
* and {@link Locale} and the default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -295,7 +295,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* pattern, and {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -310,7 +310,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* <em>pattern</em> and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -323,7 +323,7 @@ public class CalendarValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@link Calendar} using the specified
+ * Validate/convert a {@link Calendar} using the specified
* {@code TimeZone} and default {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/CodeValidator.java
b/src/main/java/org/apache/commons/validator/routines/CodeValidator.java
index 4aaccbd8..8cb5d47f 100644
--- a/src/main/java/org/apache/commons/validator/routines/CodeValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/CodeValidator.java
@@ -185,6 +185,7 @@ public final class CodeValidator implements Serializable {
* <p>
* <strong>N.B.</strong> Optional, if less than zero the
* maximum length will not be checked.
+ * </p>
*
* @return The maximum length of the code or
* {@code -1} if the code has no maximum length
@@ -198,6 +199,7 @@ public final class CodeValidator implements Serializable {
* <p>
* <strong>N.B.</strong> Optional, if less than zero the
* minimum length will not be checked.
+ * </p>
*
* @return The minimum length of the code or
* {@code -1} if the code has no minimum length
@@ -211,6 +213,7 @@ public final class CodeValidator implements Serializable {
* <p>
* <strong>N.B.</strong> Optional, if not set no regular
* expression validation will be performed on the code.
+ * </p>
*
* @return The regular expression validator
*/
@@ -224,10 +227,12 @@ public final class CodeValidator implements Serializable {
* <p>
* This calls {@link #validate(String)} and returns false
* if the return value is null, true otherwise.
+ * </p>
* <p>
* Note that {@link #validate(String)} trims the input
* and if there is a {@link RegexValidator} it may also
* change the input as part of the validation.
+ * </p>
*
* @param input The code to validate
* @return {@code true} if valid, otherwise
@@ -244,6 +249,7 @@ public final class CodeValidator implements Serializable {
* Note that this method trims the input
* and if there is a {@link RegexValidator} it may also
* change the input as part of the validation.
+ * </p>
*
* @param input The code to validate
* @return The code if valid, otherwise {@code null}
diff --git
a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
index a47220f2..c839d079 100644
---
a/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java
@@ -413,6 +413,7 @@ public class CreditCardValidator implements Serializable {
* <p>
* This can be used to combine predefined validators such as {@link
#MASTERCARD_VALIDATOR}
* with additional validators using the simpler {@link CreditCardRange}s.
+ * </p>
*
* @param creditCardValidators Set of valid code validators
* @param creditCardRanges Set of valid code validators
diff --git
a/src/main/java/org/apache/commons/validator/routines/CurrencyValidator.java
b/src/main/java/org/apache/commons/validator/routines/CurrencyValidator.java
index 16ad0a0c..775eb4aa 100644
--- a/src/main/java/org/apache/commons/validator/routines/CurrencyValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/CurrencyValidator.java
@@ -20,7 +20,7 @@ import java.text.DecimalFormat;
import java.text.Format;
/**
- * <p><strong>Currency Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).</p>
+ * <strong>Currency Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).
*
* <p>This is one implementation of a currency validator that has the
following features:</p>
* <ul>
@@ -79,7 +79,7 @@ public class CurrencyValidator extends BigDecimalValidator {
}
/**
- * <p>Parse the value with the specified {@code Format}.</p>
+ * Parse the value with the specified {@code Format}.
*
* <p>This implementation is lenient whether the currency symbol
* is present or not. The default {@code NumberFormat}
diff --git
a/src/main/java/org/apache/commons/validator/routines/DateValidator.java
b/src/main/java/org/apache/commons/validator/routines/DateValidator.java
index d558b498..bb8ee2f1 100644
--- a/src/main/java/org/apache/commons/validator/routines/DateValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/DateValidator.java
@@ -24,7 +24,7 @@ import java.util.Locale;
import java.util.TimeZone;
/**
- * <p><strong>Date Validation</strong> and Conversion routines ({@code
java.util.Date}).</p>
+ * <strong>Date Validation</strong> and Conversion routines ({@code
java.util.Date}).
*
* <p>This validator provides a number of methods for validating/converting
* a {@link String} date value to a {@code java.util.Date} using
@@ -117,7 +117,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Dates (day, month and year - not time).</p>
+ * Compare Dates (day, month and year - not time).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -133,7 +133,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Months (month and year).</p>
+ * Compare Months (month and year).
*
* @param value The {@code Date} value to check.
* @param compare The {@code Date} to compare the value to.
@@ -149,7 +149,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Quarters (quarter and year).</p>
+ * Compare Quarters (quarter and year).
*
* @param value The {@code Date} value to check.
* @param compare The {@code Date} to compare the value to.
@@ -163,7 +163,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Quarters (quarter and year).</p>
+ * Compare Quarters (quarter and year).
*
* @param value The {@code Date} value to check.
* @param compare The {@code Date} to compare the value to.
@@ -180,7 +180,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Weeks (week and year).</p>
+ * Compare Weeks (week and year).
*
* @param value The {@code Date} value to check.
* @param compare The {@code Date} to compare the value to.
@@ -196,7 +196,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Years.</p>
+ * Compare Years.
*
* @param value The {@code Date} value to check.
* @param compare The {@code Date} to compare the value to.
@@ -212,7 +212,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Convert a {@code Date} to a {@link Calendar}.</p>
+ * Convert a {@code Date} to a {@link Calendar}.
*
* @param value The date value to be converted.
* @return The converted {@link Calendar}.
@@ -230,7 +230,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Returns the parsed {@code Date} unchanged.</p>
+ * Returns the parsed {@code Date} unchanged.
*
* @param value The parsed {@code Date} object created.
* @param formatter The Format used to parse the value with.
@@ -242,7 +242,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the default
+ * Validate/convert a {@code Date} using the default
* {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -254,7 +254,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* {@link Locale} and default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -266,7 +266,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -279,7 +279,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* <em>pattern</em> and default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -292,7 +292,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified pattern
+ * Validate/convert a {@code Date} using the specified pattern
* and {@link Locale} and the default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -306,7 +306,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* pattern, and {@link Locale} and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -321,7 +321,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* <em>pattern</em> and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -335,7 +335,7 @@ public class DateValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a {@code Date} using the specified
+ * Validate/convert a {@code Date} using the specified
* {@code TimeZone} and default {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
b/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
index 3eac057d..2e845e20 100644
--- a/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/DomainValidator.java
@@ -23,7 +23,7 @@ import java.util.List;
import java.util.Locale;
/**
- * <p><strong>Domain name</strong> validation routines.</p>
+ * <strong>Domain name</strong> validation routines.
*
* <p>
* This validator provides methods for validating Internet domain names
diff --git
a/src/main/java/org/apache/commons/validator/routines/DoubleValidator.java
b/src/main/java/org/apache/commons/validator/routines/DoubleValidator.java
index b28f2065..e1f96e93 100644
--- a/src/main/java/org/apache/commons/validator/routines/DoubleValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/DoubleValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Double Validation</strong> and Conversion routines ({@link
Double}).</p>
+ * <strong>Double Validation</strong> and Conversion routines ({@link Double}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -85,8 +85,8 @@ public class DoubleValidator extends AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -201,7 +201,7 @@ public class DoubleValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Double} using the default
+ * Validate/convert a {@code Double} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -213,7 +213,7 @@ public class DoubleValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Double} using the
+ * Validate/convert a {@code Double} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -225,7 +225,7 @@ public class DoubleValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Double} using the
+ * Validate/convert a {@code Double} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -237,7 +237,7 @@ public class DoubleValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Double} using the
+ * Validate/convert a {@code Double} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/EmailValidator.java
b/src/main/java/org/apache/commons/validator/routines/EmailValidator.java
index c1f41ad1..2235f59b 100644
--- a/src/main/java/org/apache/commons/validator/routines/EmailValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/EmailValidator.java
@@ -21,7 +21,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * <p>Perform email validations.</p>
+ * Perform email validations.
* <p>
* Based on a script by <a href="mailto:[email protected]">Sandeep V.
Tamhankar</a>
* https://javascript.internet.com
@@ -166,7 +166,7 @@ public class EmailValidator implements Serializable {
}
/**
- * <p>Checks if a field has a valid e-mail address.</p>
+ * Checks if a field has a valid e-mail address.
*
* @param email The value validation is being performed on. A {@code null}
* value is considered invalid.
diff --git
a/src/main/java/org/apache/commons/validator/routines/FloatValidator.java
b/src/main/java/org/apache/commons/validator/routines/FloatValidator.java
index 1c163207..626eb680 100644
--- a/src/main/java/org/apache/commons/validator/routines/FloatValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/FloatValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Float Validation</strong> and Conversion routines ({@link
Float}).</p>
+ * <strong>Float Validation</strong> and Conversion routines ({@link Float}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -85,8 +85,8 @@ public class FloatValidator extends AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -110,7 +110,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is within a specified range.
+ * Tests if the value is within a specified range.
*
* @param value The {@code Number} value to check.
* @param min The minimum value of the range.
@@ -123,7 +123,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is within a specified range.
+ * Tests if the value is within a specified range.
*
* @param value The {@code Number} value to check.
* @param min The minimum value of the range.
@@ -136,7 +136,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is less than or equal to a maximum.
+ * Tests if the value is less than or equal to a maximum.
*
* @param value The value validation is being performed on.
* @param max The maximum value.
@@ -148,7 +148,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is less than or equal to a maximum.
+ * Tests if the value is less than or equal to a maximum.
*
* @param value The value validation is being performed on.
* @param max The maximum value.
@@ -160,7 +160,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is greater than or equal to a minimum.
+ * Tests if the value is greater than or equal to a minimum.
*
* @param value The value validation is being performed on.
* @param min The minimum value.
@@ -172,7 +172,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * Check if the value is greater than or equal to a minimum.
+ * Tests if the value is greater than or equal to a minimum.
*
* @param value The value validation is being performed on.
* @param min The minimum value.
@@ -184,8 +184,8 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * <p>Perform further validation and convert the {@code Number} to
- * a {@code Float}.</p>
+ * Perform further validation and convert the {@code Number} to
+ * a {@code Float}.
*
* @param value The parsed {@code Number} object created.
* @param formatter The Format used to parse the value with.
@@ -213,7 +213,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Float} using the default
+ * Validate/convert a {@code Float} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -225,7 +225,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Float} using the
+ * Validate/convert a {@code Float} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -237,7 +237,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Float} using the
+ * Validate/convert a {@code Float} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -249,7 +249,7 @@ public class FloatValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Float} using the
+ * Validate/convert a {@code Float} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
b/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
index 5de5d5fb..1a628ba2 100644
--- a/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/IBANValidator.java
@@ -28,6 +28,7 @@ import
org.apache.commons.validator.routines.checkdigit.IBANCheckDigit;
* IBAN Validator.
* <p>
* Checks an IBAN for:
+ * </p>
* <ul>
* <li>country code prefix</li>
* <li>IBAN length</li>
@@ -90,8 +91,8 @@ public class IBANValidator {
/**
* Creates the validator.
*
- * @param countryCode the country code
- * @param ibanLength the length of the IBAN
+ * @param countryCode the country code.
+ * @param ibanLength the length of the IBAN.
* @param regexWithCC the regex to use to check the format, the regex
MUST start with the country code.
*/
public Validator(final String countryCode, final int ibanLength, final
String regexWithCC) {
@@ -101,8 +102,8 @@ public class IBANValidator {
/**
* Creates the validator.
*
- * @param countryCode the country code
- * @param ibanLength the length of the IBAN
+ * @param countryCode the country code.
+ * @param ibanLength the length of the IBAN.
* @param regexWithoutCC the regex to use to check the format, the
regex MUST NOT start with the country code.
*/
Validator(final String countryCode, final int ibanLength, final String
regexWithoutCC, final String... otherCountryCodes) {
@@ -149,7 +150,7 @@ public class IBANValidator {
/*
* Note: the IBAN PDF registry file implies that IBANs can contain
lower-case letters.
* However, several other documents state that IBANs must be upper-case
only.
- * [See the comment block following this array.]
+ * See the comment block following this array.
*
* In the Regexes below, only upper-case is used.
*/
@@ -244,7 +245,7 @@ public class IBANValidator {
new Validator("VG", 24, "VG\\d{2}[A-Z]{4}\\d{16}"),
// Virgin Islands
new Validator("XK", 20, "XK\\d{18}"),
// Kosovo
new Validator("YE", 30, "YE\\d{2}[A-Z]{4}\\d{4}[A-Z0-9]{18}"),
// Yemen
- // @formatter:off
+ // @formatter:on
};
/*
@@ -279,9 +280,9 @@ public class IBANValidator {
public static final IBANValidator DEFAULT_IBAN_VALIDATOR = new
IBANValidator();
/**
- * Gets the singleton instance of the IBAN validator using the default
formats
+ * Gets the singleton instance of the IBAN validator using the default
formats.
*
- * @return A singleton instance of the IBAN validator
+ * @return A singleton instance of the IBAN validator.
*/
public static IBANValidator getInstance() {
return DEFAULT_IBAN_VALIDATOR;
@@ -299,7 +300,7 @@ public class IBANValidator {
/**
* Create an IBAN validator from the specified map of IBAN formats.
*
- * @param validators map of IBAN formats
+ * @param validators map of IBAN formats.
*/
public IBANValidator(final Validator[] validators) {
this.validatorMap = createValidators(validators);
@@ -319,16 +320,16 @@ public class IBANValidator {
/**
* Gets a copy of the default Validators.
*
- * @return a copy of the default Validator array
+ * @return a copy of the default Validator array.
*/
public Validator[] getDefaultValidators() {
return Arrays.copyOf(DEFAULT_VALIDATORS, DEFAULT_VALIDATORS.length);
}
/**
- * Gets the Validator for a given IBAN
+ * Gets the Validator for a given IBAN.
*
- * @param code a string starting with the ISO country code (for example,
an IBAN)
+ * @param code a string starting with the ISO country code (for example,
an IBAN).
* @return the validator or {@code null} if there is not one registered.
*/
public Validator getValidator(final String code) {
@@ -340,36 +341,34 @@ public class IBANValidator {
}
/**
- * Does the class have the required validator?
+ * Tests if the given code has a validator.
*
- * @param code the code to check
- * @return true if there is a validator
+ * @param code the code to check.
+ * @return true if there is a validator.
*/
public boolean hasValidator(final String code) {
return getValidator(code) != null;
}
/**
- * Validate an IBAN Code
+ * Tests an IBAN Code.
*
- * @param code The value validation is being performed on
- * @return {@code true} if the value is valid
+ * @param code The value validation is being performed on.
+ * @return {@code true} if the value is valid.
*/
public boolean isValid(final String code) {
return validate(code) == IBANValidatorStatus.VALID;
}
/**
- * Installs a validator.
- * Will replace any existing entry which has the same countryCode.
+ * Installs a validator. Will replace any existing entry which has the
same countryCode.
*
- * @param countryCode the country code
- * @param length the length of the IBAN. Must be ≥ 8 and ≤ 32.
- * If the length is < 0, the validator is removed, and the format is
not used.
- * @param format the format of the IBAN (as a regular expression)
- * @return the previous Validator, or {@code null} if there was none
- * @throws IllegalArgumentException if there is a problem
- * @throws IllegalStateException if an attempt is made to modify the
singleton validator
+ * @param countryCode the country code.
+ * @param length the length of the IBAN. Must be ≥ 8 and ≤ 32.
If the length is < 0, the validator is removed, and the format is not used.
+ * @param format the format of the IBAN (as a regular expression).
+ * @return the previous Validator, or {@code null} if there was none.
+ * @throws IllegalArgumentException if there is a problem.
+ * @throws IllegalStateException if an attempt is made to modify the
singleton validator.
*/
public Validator setValidator(final String countryCode, final int length,
final String format) {
if (this == DEFAULT_IBAN_VALIDATOR) {
@@ -388,12 +387,11 @@ public class IBANValidator {
}
/**
- * Installs a validator.
- * Will replace any existing entry which has the same countryCode
+ * Installs a validator. Will replace any existing entry which has the
same countryCode.
*
* @param validator the instance to install.
- * @return the previous Validator, or {@code null} if there was none
- * @throws IllegalStateException if an attempt is made to modify the
singleton validator
+ * @return the previous Validator, or {@code null} if there was none.
+ * @throws IllegalStateException if an attempt is made to modify the
singleton validator.
*/
public Validator setValidator(final Validator validator) {
if (this == DEFAULT_IBAN_VALIDATOR) {
@@ -412,10 +410,10 @@ public class IBANValidator {
}
/**
- * Validate an IBAN Code
+ * Validate an IBAN Code.
*
- * @param code The value validation is being performed on
- * @return {@link IBANValidatorStatus} for validation
+ * @param code The value validation is being performed on.
+ * @return {@link IBANValidatorStatus} for validation.
* @since 1.10.0
*/
public IBANValidatorStatus validate(final String code) {
@@ -423,15 +421,12 @@ public class IBANValidator {
if (formatValidator == null) {
return IBANValidatorStatus.UNKNOWN_COUNTRY;
}
-
if (code.length() != formatValidator.ibanLength) {
return IBANValidatorStatus.INVALID_LENGTH;
}
-
if (!formatValidator.regexValidator.isValid(code)) {
return IBANValidatorStatus.INVALID_PATTERN;
}
-
return IBANCheckDigit.IBAN_CHECK_DIGIT.isValid(code) ?
IBANValidatorStatus.VALID : IBANValidatorStatus.INVALID_CHECKSUM;
}
}
diff --git
a/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
b/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
index c06c9d88..8434296c 100644
--- a/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/ISBNValidator.java
@@ -30,17 +30,21 @@ import
org.apache.commons.validator.routines.checkdigit.ISBN10CheckDigit;
* (using a {@link CodeValidator} with the {@link ISBN10CheckDigit})
* or a valid ISBN-13 code (using a {@link CodeValidator} with
* the {@link EAN13CheckDigit} routine).
+ * </p>
* <p>
* The {@code validate()} methods return the ISBN code with formatting
* characters removed if valid or {@code null} if invalid.
+ * </p>
* <p>
* This validator also provides the facility to convert ISBN-10 codes to
* ISBN-13 if the {@code convert} property is {@code true}.
+ * </p>
* <p>
* From 1st January 2007 the book industry will start to use a new 13 digit
* ISBN number (rather than this 10 digit ISBN number). ISBN-13 codes are
* <a href="https://en.wikipedia.org/wiki/European_Article_Number">EAN</a>
- * codes, for more information see:</p>
+ * codes, for more information see:
+ * </p>
*
* <ul>
* <li><a href="https://en.wikipedia.org/wiki/ISBN">Wikipedia - International
@@ -52,16 +56,20 @@ import
org.apache.commons.validator.routines.checkdigit.ISBN10CheckDigit;
* Transition details</a>.</li>
* </ul>
*
- * <p>ISBN-13s are either prefixed with 978 or 979. 978 prefixes are only
assigned
+ * <p>
+ * ISBN-13s are either prefixed with 978 or 979. 978 prefixes are only assigned
* to the ISBN agency. 979 prefixes may be assigned to ISBNs or ISMNs
* (<a href="https://www.ismn-international.org/">International
* Standard Music Numbers</a>).
+ * </p>
* <ul>
* <li>979-0 are assigned to the ISMN agency</li>
* <li>979-10, 979-11, 979-12 are assigned to the ISBN agency</li>
* </ul>
+ * <p>
* All other 979 prefixed EAN-13 numbers have not yet been assigned to an
agency. The
* validator validates all 13-digit codes with 978 or 979 prefixes.
+ * </p>
*
* @since 1.4
*/
@@ -155,6 +163,7 @@ public class ISBNValidator implements Serializable {
* <p>
* This method requires a valid ISBN-10 with NO formatting
* characters.
+ * </p>
*
* @param isbn10 The ISBN-10 code to convert
* @return A converted ISBN-13 code or {@code null}
@@ -221,9 +230,11 @@ public class ISBNValidator implements Serializable {
* <p>
* If valid, this method returns the ISBN code with
* formatting characters removed (such as space or hyphen).
+ * </p>
* <p>
* Converts an ISBN-10 codes to ISBN-13 if
* {@code convertToISBN13} is {@code true}.
+ * </p>
*
* @param code The code to validate.
* @return A valid ISBN code if valid, otherwise {@code null}.
@@ -244,6 +255,7 @@ public class ISBNValidator implements Serializable {
* <p>
* If valid, this method returns the ISBN-10 code with
* formatting characters removed (such as space or hyphen).
+ * </p>
*
* @param code The code to validate.
* @return A valid ISBN-10 code if valid,
@@ -259,6 +271,7 @@ public class ISBNValidator implements Serializable {
* <p>
* If valid, this method returns the ISBN-13 code with
* formatting characters removed (such as space or hyphen).
+ * </p>
*
* @param code The code to validate.
* @return A valid ISBN-13 code if valid,
diff --git
a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
index 33abaf61..c8d9c106 100644
---
a/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
+++
b/src/main/java/org/apache/commons/validator/routines/InetAddressValidator.java
@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
import org.apache.commons.validator.GenericValidator;
/**
- * <p><strong>InetAddress</strong> validation and conversion routines ({@code
java.net.InetAddress}).</p>
+ * <strong>InetAddress</strong> validation and conversion routines ({@code
java.net.InetAddress}).
*
* <p>This class provides methods to validate a candidate IP address.
*
diff --git
a/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
b/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
index 5f75813d..1042fd21 100644
--- a/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/IntegerValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Integer Validation</strong> and Conversion routines ({{@link
Integer}).</p>
+ * <strong>Integer Validation</strong> and Conversion routines ({{@link
Integer}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -85,8 +85,8 @@ public class IntegerValidator extends AbstractNumberValidator
{
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -207,7 +207,7 @@ public class IntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert an {@code Integer} using the default
+ * Validate/convert an {@code Integer} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -219,7 +219,7 @@ public class IntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert an {@code Integer} using the
+ * Validate/convert an {@code Integer} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -231,7 +231,7 @@ public class IntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert an {@code Integer} using the
+ * Validate/convert an {@code Integer} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -243,7 +243,7 @@ public class IntegerValidator extends
AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Integer} using the
+ * Validate/convert a {@code Integer} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/LongValidator.java
b/src/main/java/org/apache/commons/validator/routines/LongValidator.java
index 2cc4685b..2e88c138 100644
--- a/src/main/java/org/apache/commons/validator/routines/LongValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/LongValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Long Validation</strong> and Conversion routines ({@link
Long}).</p>
+ * <strong>Long Validation</strong> and Conversion routines ({@link Long}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -84,8 +84,8 @@ public class LongValidator extends AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -202,7 +202,7 @@ public class LongValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Long} using the default
+ * Validate/convert a {@code Long} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -214,7 +214,7 @@ public class LongValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Long} using the
+ * Validate/convert a {@code Long} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -226,7 +226,7 @@ public class LongValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Long} using the
+ * Validate/convert a {@code Long} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -238,7 +238,7 @@ public class LongValidator extends AbstractNumberValidator {
}
/**
- * <p>Validate/convert a {@code Long} using the
+ * Validate/convert a {@code Long} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/PercentValidator.java
b/src/main/java/org/apache/commons/validator/routines/PercentValidator.java
index 02278da7..ddbd8f0a 100644
--- a/src/main/java/org/apache/commons/validator/routines/PercentValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/PercentValidator.java
@@ -21,7 +21,7 @@ import java.text.DecimalFormat;
import java.text.Format;
/**
- * <p><strong>Percentage Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).</p>
+ * <strong>Percentage Validation</strong> and Conversion routines ({@code
java.math.BigDecimal}).
*
* <p>This is one implementation of a percent validator that has the following
features:</p>
* <ul>
@@ -82,7 +82,7 @@ public class PercentValidator extends BigDecimalValidator {
}
/**
- * <p>Parse the value with the specified {@code Format}.</p>
+ * Parse the value with the specified {@code Format}.
*
* <p>This implementation is lenient whether the currency symbol
* is present or not. The default {@code NumberFormat}
diff --git
a/src/main/java/org/apache/commons/validator/routines/ShortValidator.java
b/src/main/java/org/apache/commons/validator/routines/ShortValidator.java
index b50ae350..b4d597cd 100644
--- a/src/main/java/org/apache/commons/validator/routines/ShortValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/ShortValidator.java
@@ -21,7 +21,7 @@ import java.text.NumberFormat;
import java.util.Locale;
/**
- * <p><strong>Short Validation</strong> and Conversion routines ({@link
Short}).</p>
+ * <strong>Short Validation</strong> and Conversion routines ({@link Short}).
*
* <p>This validator provides a number of methods for
* validating/converting a {@link String} value to
@@ -85,8 +85,8 @@ public class ShortValidator extends AbstractNumberValidator {
}
/**
- * <p>Construct an instance with the specified strict setting
- * and format type.</p>
+ * Construct an instance with the specified strict setting
+ * and format type.
*
* <p>The {@code formatType} specified what type of
* {@code NumberFormat} is created - valid types
@@ -184,8 +184,8 @@ public class ShortValidator extends AbstractNumberValidator
{
}
/**
- * <p>Perform further validation and convert the {@code Number} to
- * a {@code Short}.</p>
+ * Perform further validation and convert the {@code Number} to
+ * a {@code Short}.
*
* @param value The parsed {@code Number} object created.
* @param formatter The Format used to parse the value with.
@@ -205,7 +205,7 @@ public class ShortValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Short} using the default
+ * Validate/convert a {@code Short} using the default
* {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -217,7 +217,7 @@ public class ShortValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Short} using the
+ * Validate/convert a {@code Short} using the
* specified {@link Locale}.
*
* @param value The value validation is being performed on.
@@ -229,7 +229,7 @@ public class ShortValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Short} using the
+ * Validate/convert a {@code Short} using the
* specified <em>pattern</em>.
*
* @param value The value validation is being performed on.
@@ -241,7 +241,7 @@ public class ShortValidator extends AbstractNumberValidator
{
}
/**
- * <p>Validate/convert a {@code Short} using the
+ * Validate/convert a {@code Short} using the
* specified pattern and/ or {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/TimeValidator.java
b/src/main/java/org/apache/commons/validator/routines/TimeValidator.java
index 41e9c1fd..813ada46 100644
--- a/src/main/java/org/apache/commons/validator/routines/TimeValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/TimeValidator.java
@@ -23,7 +23,7 @@ import java.util.Locale;
import java.util.TimeZone;
/**
- * <p><strong>Time Validation</strong> and Conversion routines ({@code
java.util.Calendar}).</p>
+ * <strong>Time Validation</strong> and Conversion routines ({@code
java.util.Calendar}).
*
* <p>This validator provides a number of methods for validating/converting
* a {@link String} time value to a {@code java.util.Calendar} using
@@ -117,7 +117,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Hours.</p>
+ * Compare Hours.
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -130,7 +130,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Minutes (hours and minutes).</p>
+ * Compare Minutes (hours and minutes).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -143,7 +143,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Seconds (hours, minutes and seconds).</p>
+ * Compare Seconds (hours, minutes and seconds).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -156,7 +156,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Compare Times (hour, minute, second and millisecond - not date).</p>
+ * Compare Times (hour, minute, second and millisecond - not date).
*
* @param value The {@link Calendar} value to check.
* @param compare The {@link Calendar} to compare the value to.
@@ -169,7 +169,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Convert the parsed {@code Date} to a {@link Calendar}.</p>
+ * Convert the parsed {@code Date} to a {@link Calendar}.
*
* @param value The parsed {@code Date} object created.
* @param formatter The Format used to parse the value with.
@@ -181,7 +181,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the default {@link Locale}
+ * Validate/convert a time using the default {@link Locale}
* and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -193,7 +193,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified {@link Locale}
+ * Validate/convert a time using the specified {@link Locale}
* default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -205,7 +205,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified {@link Locale}
+ * Validate/convert a time using the specified {@link Locale}
* and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -218,7 +218,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified <em>pattern</em> and
+ * Validate/convert a time using the specified <em>pattern</em> and
* default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -230,7 +230,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified pattern and {@link
Locale}
+ * Validate/convert a time using the specified pattern and {@link Locale}
* and the default {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -244,7 +244,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified pattern, {@link Locale}
+ * Validate/convert a time using the specified pattern, {@link Locale}
* and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -259,7 +259,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified <em>pattern</em>
+ * Validate/convert a time using the specified <em>pattern</em>
* and {@code TimeZone}.
*
* @param value The value validation is being performed on.
@@ -272,7 +272,7 @@ public class TimeValidator extends
AbstractCalendarValidator {
}
/**
- * <p>Validate/convert a time using the specified {@code TimeZone}
+ * Validate/convert a time using the specified {@code TimeZone}
* and default {@link Locale}.
*
* @param value The value validation is being performed on.
diff --git
a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
index 44862bcc..cdaaa900 100644
--- a/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
+++ b/src/main/java/org/apache/commons/validator/routines/UrlValidator.java
@@ -29,8 +29,10 @@ import java.util.regex.Pattern;
import org.apache.commons.validator.GenericValidator;
/**
- * <p><strong>URL Validation</strong> routines.</p>
+ * <strong>URL Validation</strong> routines.
+ * <p>
* Behavior of validation is modified by passing in options:
+ * </p>
* <ul>
* <li>ALLOW_2_SLASHES - [FALSE] Allows double '/' characters in the path
* component.</li>
@@ -354,7 +356,7 @@ public class UrlValidator implements Serializable {
}
/**
- * <p>Checks if a field has a valid URL address.</p>
+ * Checks if a field has a valid URL address.
*
* Note that the method calls #isValidAuthority()
* which checks that the domain is valid.