| java.lang.Object jwebtk.validator.Validator
Validator | public class Validator (Code) | | |
Method Summary | |
public static boolean | endsWith(String value, String matchString, boolean ignoreCase) Validates that the given value ends with the match string. | public static boolean | isByte(String value) | public static boolean | isCreditCard(String value) Validates a credit card number. | public static boolean | isDate(String value, Locale locale) Validates a date value to make sure it has a valid format. | public static boolean | isDate(String value, String datePattern, boolean strict) Validates a date value to make sure it has a valid format matching the given date pattern. | public static boolean | isDouble(String value) Validates a double value. | public static boolean | isEmail(String value) Validates as an email value. | public static boolean | isEmptyOrNull(String value) Validates a value to make sure it is not empty or null. | public static boolean | isEqualTo(String value, String value2, boolean ignore) Validate that value compares equal to “str”. | public static boolean | isFloat(String value) Validates as a float value. | public static boolean | isInRange(byte value, byte min, byte max) Validates that a value is in a given range, inclusive. | public static boolean | isInRange(double value, double min, double max) Validates that a value is in a given range, inclusive. | public static boolean | isInRange(float value, float min, float max) Validates that a value is in a given range, inclusive. | public static boolean | isInRange(int value, int min, int max) Validates that a value is in a given range, inclusive. | public static boolean | isInRange(long value, long min, long max) Validates that a value is in a given range, inclusive. | public static boolean | isInRange(short value, short min, short max) Validates that a value is in a given range, inclusive. | public static boolean | isInt(String value) Validates an integer value. | public static boolean | isIsbn(String value) Validates an International Standard Book Number. | public static boolean | isLong(String value) Validates a long value. | public static boolean | isNotEmptyOrNull(String value) Validates a value to make sure it is not empty or null. | public static boolean | isShort(String value) Validates a short value. | public static boolean | isSubstring(String value, String compareString, boolean ignoreCase) Validates that the given value is a substring of cmp_string. | public static boolean | isUrl(String value) Validates that the given value is a properly formatted URL. | public static boolean | matchRegexp(String value, String regexp) Validates that the given value matches the provided regular expression. | public static boolean | maxLength(String value, int max) Validates that value is less than or equal to the maximum length. | public static boolean | maxValue(double value, double max) Validates that value is less than or equal to the maximum. | public static boolean | maxValue(float value, float max) Validates that value is less than or equal to the maximum. | public static boolean | maxValue(int value, int max) Validates that value is less than or equal to the maximum. | public static boolean | maxValue(long value, long max) Validates that value is less than or equal to the maximum. | public static boolean | minLength(String value, int min) Validates that value is greater than or equal to the minimum length. | public static boolean | minValue(double value, double min) Validates that value is less than or equal to the maximum. | public static boolean | minValue(float value, float min) Validates that value is greater than or equal to the minimum. | public static boolean | minValue(int value, int min) Validates that value is greater than or equal to the minimum. | public static boolean | minValue(long value, long min) Validates that value is greater than or equal to the minimum. | public static boolean | startsWith(String value, String matchString, boolean ignoreCase) Validates that the given value starts with the match string. |
endsWith | public static boolean endsWith(String value, String matchString, boolean ignoreCase)(Code) | | Validates that the given value ends with the match string.
Parameters: value - to validate Parameters: matchString - the string to check true if the value passes validation, false otherwise. |
isByte | public static boolean isByte(String value)(Code) | | Validates a byte value
Parameters: value - to validate true if the value passes validation, false otherwise. |
isCreditCard | public static boolean isCreditCard(String value)(Code) | | Validates a credit card number. Simply checks if it is properly formatted. Does not contact any other party for card validation.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isDate | public static boolean isDate(String value, Locale locale)(Code) | | Validates a date value to make sure it has a valid format.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isDate | public static boolean isDate(String value, String datePattern, boolean strict)(Code) | | Validates a date value to make sure it has a valid format matching the given date pattern.
Date pattern is defined in java.text.SimpleDateFormat.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isDouble | public static boolean isDouble(String value)(Code) | | Validates a double value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isEmail | public static boolean isEmail(String value)(Code) | | Validates as an email value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isEmptyOrNull | public static boolean isEmptyOrNull(String value)(Code) | | Validates a value to make sure it is not empty or null.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isEqualTo | public static boolean isEqualTo(String value, String value2, boolean ignore)(Code) | | Validate that value compares equal to “str”.
Parameters: value - to validate Parameters: value2 - string to compare Parameters: ignore - character case true if the value passes validation, false otherwise. |
isFloat | public static boolean isFloat(String value)(Code) | | Validates as a float value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(byte value, byte min, byte max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(double value, double min, double max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(float value, float min, float max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(int value, int min, int max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(long value, long min, long max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInRange | public static boolean isInRange(short value, short min, short max)(Code) | | Validates that a value is in a given range, inclusive.
Parameters: value - to validate Parameters: min - value is equal or greater Parameters: max - value is equal or less true if the value passes validation, false otherwise. |
isInt | public static boolean isInt(String value)(Code) | | Validates an integer value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isIsbn | public static boolean isIsbn(String value)(Code) | | Validates an International Standard Book Number.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isLong | public static boolean isLong(String value)(Code) | | Validates a long value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isNotEmptyOrNull | public static boolean isNotEmptyOrNull(String value)(Code) | | Validates a value to make sure it is not empty or null.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isShort | public static boolean isShort(String value)(Code) | | Validates a short value.
Parameters: value - to validate true if the value passes validation, false otherwise. |
isSubstring | public static boolean isSubstring(String value, String compareString, boolean ignoreCase)(Code) | | Validates that the given value is a substring of cmp_string.
Parameters: value - to validate Parameters: compareString - the string to check true if the value passes validation, false otherwise. |
isUrl | public static boolean isUrl(String value)(Code) | | Validates that the given value is a properly formatted URL.
Parameters: value - to validate true if the value passes validation, false otherwise. |
matchRegexp | public static boolean matchRegexp(String value, String regexp)(Code) | | Validates that the given value matches the provided regular expression.
this is based on Java regular expression as found in String.matchRegexp().
Parameters: value - to validate Parameters: regexp - the regular expression string to check true if the value passes validation, false otherwise. |
maxLength | public static boolean maxLength(String value, int max)(Code) | | Validates that value is less than or equal to the maximum length.
Parameters: value - to validate Parameters: max - the maximum length true if the value passes validation, false otherwise. |
maxValue | public static boolean maxValue(double value, double max)(Code) | | Validates that value is less than or equal to the maximum.
Parameters: value - to validate Parameters: max - the maximum length true if the value passes validation, false otherwise. |
maxValue | public static boolean maxValue(float value, float max)(Code) | | Validates that value is less than or equal to the maximum.
Parameters: value - to validate Parameters: max - the maximum length true if the value passes validation, false otherwise. |
maxValue | public static boolean maxValue(int value, int max)(Code) | | Validates that value is less than or equal to the maximum.
Parameters: value - to validate Parameters: max - the maximum length true if the value passes validation, false otherwise. |
maxValue | public static boolean maxValue(long value, long max)(Code) | | Validates that value is less than or equal to the maximum.
Parameters: value - to validate Parameters: max - the maximum length true if the value passes validation, false otherwise. |
minLength | public static boolean minLength(String value, int min)(Code) | | Validates that value is greater than or equal to the minimum length.
Parameters: value - to validate Parameters: min - the minimum length true if the value passes validation, false otherwise. |
minValue | public static boolean minValue(double value, double min)(Code) | | Validates that value is less than or equal to the maximum.
Parameters: value - to validate Parameters: min - the minimum length true if the value passes validation, false otherwise. |
minValue | public static boolean minValue(float value, float min)(Code) | | Validates that value is greater than or equal to the minimum.
Parameters: value - to validate Parameters: min - the minimum length true if the value passes validation, false otherwise. |
minValue | public static boolean minValue(int value, int min)(Code) | | Validates that value is greater than or equal to the minimum.
Parameters: value - to validate Parameters: min - the minimum length true if the value passes validation, false otherwise. |
minValue | public static boolean minValue(long value, long min)(Code) | | Validates that value is greater than or equal to the minimum.
Parameters: value - to validate Parameters: min - the minimum length true if the value passes validation, false otherwise. |
startsWith | public static boolean startsWith(String value, String matchString, boolean ignoreCase)(Code) | | Validates that the given value starts with the match string.
Parameters: value - to validate Parameters: matchString - the string to check true if the value passes validation, false otherwise. |
|
|