Release Notes CheckStyle and FindBug Issues - inner classes and key sets Email validation fails with dash or hyphen at end of local address @localhost and @localhost.localdomain email addresses aren't correctly detected as valid UrlValidator.isValid does not properly validate *.travel domains UrlValidator does not validate URL with simple domains (eg: http://hostname ) isValid method for EmailValidator should return false for domain with special characters only formatDate(String value, Locale locale) in GenericTypeValidator uses DateFormat.SHORT instead of DateFormat.DEFAULT isValidURL call returns false for file scheme/protocol when URL is correct gmail testing addresses do not validate EmailValidator.isValid(String) follows RFC822 but violates RFC1034 Performance improvement of DomainValidator by change the regular expression url with brackets is not validated thru URLvalidator class. Banking CheckDigit implementations: ABA, CUSIP, IBAN, ISIN and Sedol Add Diners card validation to CreditCardValidator Add an option to allow 'localhost' as a valid hostname part in the URL Move CreditCardValidator to routines package and refactor to use new CodeValidator Move EmailValidator to routines package New InetAdress Validator implementation Support the 65 prefix for Discover Card Create 1.4 DTD Switch to using Version 0.4.3 of the Dojo Compressor from the maven repo Add script attribute to control script generation clirr Report - EmailValidator.isValidIpAddress() argument type change Null-Stream input to ValidatorResources leads to MalformedURLExceptions validatorUtilities.js - replace colon characters in the function name (JSF/Shale) Move the trim() function from validateRequired.js to validateUtilities.js EmailValidator fails with ArrayIndexOutOfBoundsException on domain names longer than 10 segments UrlValidator fail when path contains "(" / ")" UrlValidator rejects top-level domains (TLDs) with more than 4 characters New generic CodeValidator that validates format, length and Check Digit for a code New Regular Expression validator using JDK 1.4's Regex Factor out Check Digit logic into separate implementations Upgrade to Digester 1.8 Refactor UrlValidator - especially the line 370-ish. Copy remaining Validation Routines to the new routines package Removing ORO dep. from GenericValidator Adding ISBNValidator to GenericValidator Remove the dependency on Jakarta ORO (move to JDK 1.4 regular expression support) Extend ISBN validator to support smooth transition to ISBN-13 / EAN-13 standard JDK 1.4 - change minimum dependency for validator to be JDK 1.4 (was 1.3). Primary reason for this is to use JDK 1.4+ built in regular expression support and remove the dependency on Jakarta ORO.

Dependencies: dependencies for Validator 1.3.1 are unchanged since the 1.3.0 release.

N.B.Jakarta ORO has now been marked as an optional dependency in the project.xml as it is only required by the Email, URL and Regular Expression validations.

JavaScript function jcv_isFieldPresent() causes error in IE5 using "undefined". EmailValidator allows control characters (ASCII 0-31 and 127). JavaScript Causes HTML Page to Contain Illegal HTML. Additional constructor for ValidatorResources that takes URL["> instead of String[">. Fix loading of Digester rules for custom ValidatorResources implementations. Validator incorrectly storing itself under the FORM_PARAM key rather than the Form. Urlvalidator returns false for a valid URL containing an underscore. Urlvalidator fails with an ArrayIndexOutOfBoundsException. The ant build.xml doesn't include validator_1_1_3.dtd in the jar. Example does not compile using ant build script. Validating indexed properties fails when null. Fix a thread safety issue in parameter initialization.
ValidatorResult only contains last run dependency for the field. Validator argument - resource="false" ignored for arg0 - arg3. Change JavaScript validators to cater for disabled being undefined (an issue in Netscape 4.7).

Add new routines package containing standard validations - first step in the process of clearly separating standard validation functions which can be used independantly, from the framework aspect of Commons Validator.

New validators added for Date, Time, Calendar, Byte, Short, Integer, Long, Float, Double, BigInteger, BigDecimal, Currency and Percent.

See Routines Package JavaDocs

Deprecate ValidatorResult's getActionMap() and add getActions() method to provide an Iterator of the set of action names. Use the Dojo/Rhino JavaScript compressor to created compressed versions of the static JavaScript files. Additionally create single file distros of all the static JavaScript in un-compressed and compressed format. See Dojo/Rhino Compressor. Prefix remaining JavaScript utility methods with "jcv_" to reduce the likelihood of clashes with other libraries - validator still needs to be properly namespaced (as per Bug 38184). Change JavaScript validators so that they don't fail when the field is not present on the form. Fix min/max length validation for different line endings. Fix email validator to not allow spaces at the end of the user component or start of the domain component. Added validator_1_3_0.dtd and changed form rules so that a minimum of one field is no longer required (i.e. changed (field+) to (field*) for a form). Resolve issue in JavaScript validation when the prototype library is used. Re-factor JavaScript error handling into a common method and only set focus on fields which are not 'hidden' type or hidden by CSS. Remove static Log instances to avoid problems if deployed via a shared classloader in a container. See here for more details. Reverse change for to Credit Card Validator for visa card blue in France. Fix JavaScript validation for Internet Explorer 5.0.
Added ISBNValidator for validating book numbers. Upgrade dependency versions to Commons BeanUtils 1.7.0, Commons Digester 1.6 and Commons Logging 1.0.4. Remove dependency on Commons Collections (BeanUtils 1.7.0 has removed its dependency on Collections by including the few Collections classes required in its distribution). Add support for min or max numeric values. Allow validators to register errors for multiple fields. Fixed EmailValidator failing on valid email addresses. Allow forms to inherit validation rules from other forms. Remove the need to specify an Arguement's position. Deprecated all FastHashMap usage and provided protected get methods that return generic Maps to be used by subclasses. Handling of float and double should use the locale object. Fixes 21282 More informative Exception message when validation method not found. Client-side required validation inconsistent with server-side. EmailValidator allows apostrophes in domain name. Changing the strategy for locating form name/id, now use a common utility function which works in both IE and Firefox. Fixes 35127 and 32760 Validation fails when "name" attribute in form not specified. UrlValidator fails http://www.google.com. Email: inexisting dashes and TLD erroneously accepted. Float validator can't validate the string with several dot. CreditValidator does not handle Visa correctly. datePattern not supported by JavaScript. validateRequired on a single radio button. Field.validate() cannot be invoked from user-defined code. Locale validation doesn't validate all fields. XML file included into validation.xml via entity reference not found. Update maven build to Include DTDs and xdocs in the source distribution. Remove logging of exceptions when the Date validation fails (correctly) with an invalid date. Add version 1.1.3 of the DTD from the VALIDATOR_1_1_2_BRANCH and change digester rules so that the old arg0-arg3 values are not ignored for versions of the DTD prior to 1.2.0. Add 'resource' and 'bundle' elements to the 1.2.0 DTD. Provide access to the result object in ValidatorResult. Validation breaks on multiple validation.xml (eg. with Struts 1.3). GenericTypeValidator does not accept negative Floats/Doubles. correct UrlValidator JavaDoc. Search the locale 'hierarchy' of formsets for a Form. Int validation in Java and Javascript have different semantics. Javascript Validation currently uses unsupported DOM method getAttributeNode(). Added getMessage(key) and getMessages() methods to Field Added resource property (including getter/setter) to Msg to support the 'resource' attribute specified in the DTD. Fixed javascript file reading in Java WebStart environment. Fixed javascript email domain length limited to 2 or 3 chars. Javascript validation doesn't work if a form field is called "name". Allow multiple forms to be on the same page by generating a unique variable name based on form name. Fixes 17667 Validate file extensions for file uploads. Add Support for hidden fields in javascript validations. The framework will convert checked exceptions into ValidatorExceptions so any ValidatorException thrown out of the framework indicates a 'system' exception that stops validation processing. If a pluggable validation method throws a ValidatorException it will be rethrown and passed out of the framework. Any other exception from a pluggable validation method is still considered a validation failure rather than a system exception to maintain backwards compatibility. Added a more flexible card validation system that doesn't require CreditCardValidator to support every brand of credit card. Throw RuntimeException if clone fails instead of InternalError. Added Flags.clear(). Add javadoc to javascript, and use jsdoc to process it. Ignore validation criteria when field is disabled for all field types. Add required check for single checkbox. Let max/min length also cover passwords fields. Don't use these for checking login pages, only when the user is modifying the password. Added Field.getArgs(String) to make it easier to retrieve all of the Args for a given validator. Modify javascript to honor datapattern option. Add ability of required to handle checkboxes, radio, select-one, and select-multiple field types. Add ability to use required condition on array types like checkboxes. Move Digester rule configuration to XML file and remove ValidatorResourcesInitializer. ValidatorResources now knows how to initialize itself. Clean up scopes of methods and variables. Make Arg system more flexible to allow any number of args in a message. Validate validation.xml files while initializing a Validator to alert developers to configuration errors. Refactored GenericValidator methods into reusable objects. These include: CreditCardValidator, EmailValidator, DateValidator, and UrlValidator.

Backwards Incompatible Changes

  • <msg>'s name and key attributes are now required. The Validator code was enforcing this constraint so now it's formally defined in the DTD.

Deprecated items; see the javadoc for details and replacements.

  • The <arg0-3> elements have been replaced with a single <arg> element with a new position attribute. Setting position to 0 is the equivalent of an <arg0> element.
  • Arg.getResource()
  • CreditCardValidator.isValidPrefix()
  • Field.ARG_DEFAULT
  • Field.hDependencies
  • Field.hArg0 - Field.hArg3
  • Field.addArg0() - Field.addArg3()
  • Field.getArg0() - Field.getArg3()
  • Field.addVarParam()
  • Field.process()
  • Field.processMessageComponents()
  • Field.getDependencies()
  • Form.getFieldMap()
  • Form.process()
  • FormSet.addConstant()
  • FormSet.addConstantParam()
  • FormSet.getForm(Object)
  • FormSet.process()
  • GenericValidator.REGEXP_DELIM
  • GenericValidator.validateCreditCardLuhnCheck()
  • GenericValidator.validateCreditCardPrefixCheck()
  • GenericValidator.getDelimittedRegExp()
  • Validator.BEAN_KEY
  • Validator.VALIDATOR_ACTION_KEY
  • Validator.FIELD_KEY
  • Validator.VALIDATOR_KEY
  • Validator.LOCALE_KEY
  • Validator.hResources
  • Validator.addResource()
  • Validator.getResource()
  • ValidatorAction.process()
  • ValidatorAction.getDependencies()
  • ValidatorResources.put()
  • ValidatorResources.addConstant()
  • ValidatorResources.addConstantParam()
  • ValidatorResources.get()
  • ValidatorResources.processForms()
  • ValidatorResourcesInitializer
  • ValidatorResult.getValid()
  • ValidatorResults.empty()
  • ValidatorResults.get()
  • ValidatorResults.properties()
  • ValidatorUtil
GenericValidaor.isEmail bug. NPE in Validator.java after upgrading to Struts 1.1b3. i18n issue, variant not being picked up by Validator. isEmail accepts Umlauts and other non-ASCII characters. Email address validation incorrectly accepts commas. unknown host when loading app. Serialization problem with org.apache.commons.validator.ValidatorResult$ResultStatus. ValidatorResources.get-method not working properly. First Release.