JaValid is an annotation-based validation framework and can be used in any type of Java application. It provides full integration with the Spring Framework, Java Server Faces, Facelets and any Database. For more info visit: http://www.javalid.org


http://www.javalid.org





Separate each tag with a space.

Release Date:

2009-05-09

Topic:

License:

Translations:

Intended Audience:

Programming Language:

Registered:

2008-03-26

Ratings and Reviews

Be the first to post a text review of JaValid. Rate and review a project by clicking thumbs up or thumbs down in the right column.

Project Feed

  • Code committed

    mreuvers committed revision 73 to the JaValid SVN repository, changing 10 files

    posted by mreuvers 40 days ago

  • Code committed

    mreuvers committed revision 72 to the JaValid SVN repository, changing 44 files

    posted by mreuvers 45 days ago

  • JaValid 1.2 file released: javalid-release-src-1.2.zip

    -------------------------------------------------------------------------------- Changes from 1.2-rc1 to 1.2 -------------------------------------------------------------------------------- - Added @ExactLength which did not make it into the RC1 as tests were not finished then. - @BetweenLength, @MinLength and @MaxLength support java.lang.StringBuilder now -------------------------------------------------------------------------------- Changes from 1.1 to 1.2-rc1 -------------------------------------------------------------------------------- FEATURES/ENHANCEMENTS: - Core rewritten from scratch, optimization of code and maintainability (it is fully backwards compatible). - Introduced advanced caching, once a class has been retrospected it is cached. The next time a simalar class is encountered, the cache is used. This works for inheritance hierarchies as well. - Annotations are registered by default now (for core and extensions), * Extensions register their annotations as soon as they are enabled. This reduces unnecessary configuration. * Update your configuration file if you used one! * Remember: the core can always be used without any configuration! - Removed the setValueToNull option in the constructors of the AnnotationValidors (jv-value-to-null-if-empty option removed from jsf too), instead just use @NotEmpty annotation in these cases. - JavalidValidator interface introduces complex validation option. Therefore refactored all existing validators (they now extend AbstractJavalidValidator). The change is backwards compatible if you let any custom 1.1 validators extend AbstractJavalidValidator. - Added new validation annotations: * @DateBefore Validates that a date is before another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateAfter Validates that a date is after another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateEqual Validates that a date matches another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateNotEqual Validates that a date does not equal another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. - Added support for classlevel annotation validations as well as introduced several of these new type of annotations: * @NotNullAll All values for this annotation must be non-null. Values are given as expressions and can 'walk' around the object tree if needed. * @NullOrNotNullAll All values for this annotation must be non-null or all must be null. Values are given as expressions and can 'walk' around the object tree if needed. * @NotEmptyAll All values for this annotation must be non-empty. Values are given an as expressions and can 'walk' around the object tree if needed. * @EmptyOrNotEmptyAll All values for this annotaton must be non-empty or all be empty. Values are given as expressions and can 'walk' around the object tree if needed. Can be used for values of type: java.lang.String,java.lang.StringBuffer,java.lang.StringBuilder, all arrays,java.util.Collection and java.util.Map. - Added MessageCode resolver, which allows to resolve message codes. - Added automatic message resolving (if enabled) for validation messages. - @ValidateDefinition now allows you to override the default location of annotations by explicitly setting it to method or field for a given class. - Added @StopValidation annotation, which allows to stop processing the annotated field / method (in addition to what annotations provide). - @JvGroup is not required anymore on methods/fields/class if you need default validation (without groups or other options), it will use the default group then (which is "1") - Added Spring AnnotationValidatorBeanPostProcessor (contributed by Scott Battaglia) which allows for validation of Spring Beans in an automated way. - @MinLength / @MaxLength / @BetweenLength added support for byte length comparison in addition to the default character comparison. (SF 2136098). - @NotEmpty improved, it can be annotated on java.lang.String, java.lang.StringBuffer, java.lang.StringBuilder, any array, java.util.Collection and java.util.Map - Added option to provide configuration file in AnnotationValidator as an URL (was String only). - The default jv-config.xml has been renamed to jv-config-method.xml (which is the same as the old jv-config.xml) and a new one has been added named jv-config-field.xml. The new one defines that annotations should be on fields (the default configuration has methods). -------------------------------------------------------------------------------- Changes from 1.1rc1 to 1.1 -------------------------------------------------------------------------------- Bugs fixed: - Loading of Spring defined datasource fails -toString() ValidationMessage causes a nullpointer if array with null values is passed. - If JSF is detected, incorrect elcontext is loaded for database extension - Integration issues Spring datasource and database extension - validateProperty now properly calls beginValidation and afterValidation to assure that extensions can initialize/cleanup properly (just as is the case with validateObject). FEATURES/ENHANCEMENTS: -Loading of config file in debug mode does not print stacktrace anymore, as this could be confusing (just prints a message instead). - Validator can now also be specified as a bean in the JSF extension in web.xml to be found in for instance Spring context or through the JSF EL context (this allows a single definition of a validator to be shared) KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0.1 to 1.1rc1 -------------------------------------------------------------------------------- BUGS fixed: - Fixed webtest of spring, was broken in Tomcat 5.5 - Fixed bug with jv-ui:validate tag, which only resolved an expression once. - 1967984 Fixed incorrect documentation for jv-ui:validate component FEATURES/ENHANCEMENTS: - Introduced the option to add your own extensions to JaValid (don't confuse with custom annotations). Allowing you to add anything to it you like. Extensions from 1.0 (Spring / JSF) are refactored to the new extensions standard as well. Check the docs on how to add a new extension! - Added Database extension for validation. Using available datasources (from container or handmade). Check out the docs how to use this! - Added @DbNumCheck annotation which provides a powerful database check, including specialized EL support in the queries. - Added JavalidValidationCallbackHandler to be passed when calling a validateObject() method. Allows for customization before / after validation. - Added plural annotations for all existing validation annotations, that is you can use a validation annotation multiple times on the same field/method e.g @MinLengths(values={@MinLength(..),@MinLength(..)}. The original way from 1.0 works still fine too. Check the docs how to add this to your own annotations! (SF: 1992025 Support use of similar annotations on same field/method) - Added @DateCheck annotation, which allows to check dates (equals, more, less etc). - Added support for field validation through the jv-ui tag (was only method) - ValidatorSupport, ReflectionSupport, XMLSupport, JsfSupport, JsfMessageConverter refactored, all methods are static final and the constructors are private. - Added a new web test project which has jsf 1.2 with facelets, as sample, but as a test as well. KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0 to 1.0.1 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1963863 Code is now independent of JSF version by introducing JsfFacade -------------------------------------------------------------------------------- Changes from 1.0-rc2 to 1.0 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1954319 Provide selective global message support 1955130 Add BigInteger / BigDecimal support 1956675 Add Collection size check annotation -- Refactored JvValidator to JavalidValidator (check custom annotations!) -- Added more examples NOTES: None. -------------------------------------------------------------------------------- Changes from 1.0-rc1 to 1.0-rc2 -------------------------------------------------------------------------------- BUGS fixed: 1944076 Inheritance validation fails in some cases 1946399 Cannot use core library directly, noclassdeffounderror FEATURES/ENHANCEMENTS: -- Added a few more examples. NOTES: None.

    posted 197 days ago

  • JaValid 1.2 file released: javalid-release-bin-1.2.zip

    -------------------------------------------------------------------------------- Changes from 1.2-rc1 to 1.2 -------------------------------------------------------------------------------- - Added @ExactLength which did not make it into the RC1 as tests were not finished then. - @BetweenLength, @MinLength and @MaxLength support java.lang.StringBuilder now -------------------------------------------------------------------------------- Changes from 1.1 to 1.2-rc1 -------------------------------------------------------------------------------- FEATURES/ENHANCEMENTS: - Core rewritten from scratch, optimization of code and maintainability (it is fully backwards compatible). - Introduced advanced caching, once a class has been retrospected it is cached. The next time a simalar class is encountered, the cache is used. This works for inheritance hierarchies as well. - Annotations are registered by default now (for core and extensions), * Extensions register their annotations as soon as they are enabled. This reduces unnecessary configuration. * Update your configuration file if you used one! * Remember: the core can always be used without any configuration! - Removed the setValueToNull option in the constructors of the AnnotationValidors (jv-value-to-null-if-empty option removed from jsf too), instead just use @NotEmpty annotation in these cases. - JavalidValidator interface introduces complex validation option. Therefore refactored all existing validators (they now extend AbstractJavalidValidator). The change is backwards compatible if you let any custom 1.1 validators extend AbstractJavalidValidator. - Added new validation annotations: * @DateBefore Validates that a date is before another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateAfter Validates that a date is after another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateEqual Validates that a date matches another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateNotEqual Validates that a date does not equal another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. - Added support for classlevel annotation validations as well as introduced several of these new type of annotations: * @NotNullAll All values for this annotation must be non-null. Values are given as expressions and can 'walk' around the object tree if needed. * @NullOrNotNullAll All values for this annotation must be non-null or all must be null. Values are given as expressions and can 'walk' around the object tree if needed. * @NotEmptyAll All values for this annotation must be non-empty. Values are given an as expressions and can 'walk' around the object tree if needed. * @EmptyOrNotEmptyAll All values for this annotaton must be non-empty or all be empty. Values are given as expressions and can 'walk' around the object tree if needed. Can be used for values of type: java.lang.String,java.lang.StringBuffer,java.lang.StringBuilder, all arrays,java.util.Collection and java.util.Map. - Added MessageCode resolver, which allows to resolve message codes. - Added automatic message resolving (if enabled) for validation messages. - @ValidateDefinition now allows you to override the default location of annotations by explicitly setting it to method or field for a given class. - Added @StopValidation annotation, which allows to stop processing the annotated field / method (in addition to what annotations provide). - @JvGroup is not required anymore on methods/fields/class if you need default validation (without groups or other options), it will use the default group then (which is "1") - Added Spring AnnotationValidatorBeanPostProcessor (contributed by Scott Battaglia) which allows for validation of Spring Beans in an automated way. - @MinLength / @MaxLength / @BetweenLength added support for byte length comparison in addition to the default character comparison. (SF 2136098). - @NotEmpty improved, it can be annotated on java.lang.String, java.lang.StringBuffer, java.lang.StringBuilder, any array, java.util.Collection and java.util.Map - Added option to provide configuration file in AnnotationValidator as an URL (was String only). - The default jv-config.xml has been renamed to jv-config-method.xml (which is the same as the old jv-config.xml) and a new one has been added named jv-config-field.xml. The new one defines that annotations should be on fields (the default configuration has methods). -------------------------------------------------------------------------------- Changes from 1.1rc1 to 1.1 -------------------------------------------------------------------------------- Bugs fixed: - Loading of Spring defined datasource fails -toString() ValidationMessage causes a nullpointer if array with null values is passed. - If JSF is detected, incorrect elcontext is loaded for database extension - Integration issues Spring datasource and database extension - validateProperty now properly calls beginValidation and afterValidation to assure that extensions can initialize/cleanup properly (just as is the case with validateObject). FEATURES/ENHANCEMENTS: -Loading of config file in debug mode does not print stacktrace anymore, as this could be confusing (just prints a message instead). - Validator can now also be specified as a bean in the JSF extension in web.xml to be found in for instance Spring context or through the JSF EL context (this allows a single definition of a validator to be shared) KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0.1 to 1.1rc1 -------------------------------------------------------------------------------- BUGS fixed: - Fixed webtest of spring, was broken in Tomcat 5.5 - Fixed bug with jv-ui:validate tag, which only resolved an expression once. - 1967984 Fixed incorrect documentation for jv-ui:validate component FEATURES/ENHANCEMENTS: - Introduced the option to add your own extensions to JaValid (don't confuse with custom annotations). Allowing you to add anything to it you like. Extensions from 1.0 (Spring / JSF) are refactored to the new extensions standard as well. Check the docs on how to add a new extension! - Added Database extension for validation. Using available datasources (from container or handmade). Check out the docs how to use this! - Added @DbNumCheck annotation which provides a powerful database check, including specialized EL support in the queries. - Added JavalidValidationCallbackHandler to be passed when calling a validateObject() method. Allows for customization before / after validation. - Added plural annotations for all existing validation annotations, that is you can use a validation annotation multiple times on the same field/method e.g @MinLengths(values={@MinLength(..),@MinLength(..)}. The original way from 1.0 works still fine too. Check the docs how to add this to your own annotations! (SF: 1992025 Support use of similar annotations on same field/method) - Added @DateCheck annotation, which allows to check dates (equals, more, less etc). - Added support for field validation through the jv-ui tag (was only method) - ValidatorSupport, ReflectionSupport, XMLSupport, JsfSupport, JsfMessageConverter refactored, all methods are static final and the constructors are private. - Added a new web test project which has jsf 1.2 with facelets, as sample, but as a test as well. KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0 to 1.0.1 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1963863 Code is now independent of JSF version by introducing JsfFacade -------------------------------------------------------------------------------- Changes from 1.0-rc2 to 1.0 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1954319 Provide selective global message support 1955130 Add BigInteger / BigDecimal support 1956675 Add Collection size check annotation -- Refactored JvValidator to JavalidValidator (check custom annotations!) -- Added more examples NOTES: None. -------------------------------------------------------------------------------- Changes from 1.0-rc1 to 1.0-rc2 -------------------------------------------------------------------------------- BUGS fixed: 1944076 Inheritance validation fails in some cases 1946399 Cannot use core library directly, noclassdeffounderror FEATURES/ENHANCEMENTS: -- Added a few more examples. NOTES: None.

    posted 197 days ago

  • JaValid 1.2 released

    JaValid 1.2 final has been released today. JaValid allows you to do annotation based validation for Java Objects. It optionally integrates with Spring, JSF, Facelets and any database. It can be used for any Java application. Check out the blog http://www.javalid.org/wps/ to see what changed, or visit http://www.javalid.org to learn more (for samples, documentation, downloads etc).

    posted by mreuvers 197 days ago

  • File released: /JaValid/1.2/javalid-release-src-1.2.zip

    posted 197 days ago

  • File released: /JaValid/1.2/javalid-release-bin-1.2.zip

    posted 197 days ago

  • JaValid 1.2 -rc1 released

    JaValid 1.2 release candidate 1 has been released today. JaValid allows you to do annotation based validation for Java Objects. It optionally integrates with Spring, JSF, Facelets and any database. It can be used for any Java application. Check out the blog http://www.javalid.org/wps/ to see what changed, or visit http://www.javalid.org to learn more (for samples, documentation, downloads etc).

    posted by mreuvers 253 days ago

  • JaValid 1.2-rc1 file released: javalid-release-src-1.2-rc1.zip

    -------------------------------------------------------------------------------- Changes from 1.1 to 1.2-rc1 -------------------------------------------------------------------------------- FEATURES/ENHANCEMENTS: - Core rewritten from scratch, optimization of code and maintainability (it is fully backwards compatible). - Introduced advanced caching, once a class has been retrospected it is cached. The next time a simalar class is encountered, the cache is used. This works for inheritance hierarchies as well. - Annotations are registered by default now (for core and extensions), * Extensions register their annotations as soon as they are enabled. This reduces unnecessary configuration. * Update your configuration file if you used one! * Remember: the core can always be used without any configuration! - Removed the setValueToNull option in the constructors of the AnnotationValidors (jv-value-to-null-if-empty option removed from jsf too), instead just use @NotEmpty annotation in these cases. - JavalidValidator interface introduces complex validation option. Therefore refactored all existing validators (they now extend AbstractJavalidValidator). The change is backwards compatible if you let any custom 1.1 validators extend AbstractJavalidValidator. - Added new validation annotations: * @DateBefore Validates that a date is before another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateAfter Validates that a date is after another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateEqual Validates that a date matches another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateNotEqual Validates that a date does not equal another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. - Added support for classlevel annotation validations as well as introduced several of these new type of annotations: * @NotNullAll All values for this annotation must be non-null. Values are given as expressions and can 'walk' around the object tree if needed. * @NullOrNotNullAll All values for this annotation must be non-null or all must be null. Values are given as expressions and can 'walk' around the object tree if needed. * @NotEmptyAll All values for this annotation must be non-empty. Values are given an as expressions and can 'walk' around the object tree if needed. * @EmptyOrNotEmptyAll All values for this annotaton must be non-empty or all be empty. Values are given as expressions and can 'walk' around the object tree if needed. Can be used for values of type: java.lang.String,java.lang.StringBuffer,java.lang.StringBuilder, all arrays,java.util.Collection and java.util.Map. - Added MessageCode resolver, which allows to resolve message codes. - Added automatic message resolving (if enabled) for validation messages. - @ValidateDefinition now allows you to override the default location of annotations by explicitly setting it to method or field for a given class. - Added @StopValidation annotation, which allows to stop processing the annotated field / method (in addition to what annotations provide). - @JvGroup is not required anymore on methods/fields/class if you need default validation (without groups or other options), it will use the default group then (which is "1") - Added Spring AnnotationValidatorBeanPostProcessor (contributed by Scott Battaglia) which allows for validation of Spring Beans in an automated way. - @MinLength / @MaxLength / @BetweenLength added support for byte length comparison in addition to the default character comparison. (SF 2136098). - @NotEmpty improved, it can be annotated on java.lang.String, java.lang.StringBuffer, java.lang.StringBuilder, any array, java.util.Collection and java.util.Map - Added option to provide configuration file in AnnotationValidator as an URL (was String only). - The default jv-config.xml has been renamed to jv-config-method.xml (which is the same as the old jv-config.xml) and a new one has been added named jv-config-field.xml. The new one defines that annotations should be on fields (the default configuration has methods). -------------------------------------------------------------------------------- Changes from 1.1rc1 to 1.1 -------------------------------------------------------------------------------- Bugs fixed: - Loading of Spring defined datasource fails -toString() ValidationMessage causes a nullpointer if array with null values is passed. - If JSF is detected, incorrect elcontext is loaded for database extension - Integration issues Spring datasource and database extension - validateProperty now properly calls beginValidation and afterValidation to assure that extensions can initialize/cleanup properly (just as is the case with validateObject). FEATURES/ENHANCEMENTS: -Loading of config file in debug mode does not print stacktrace anymore, as this could be confusing (just prints a message instead). - Validator can now also be specified as a bean in the JSF extension in web.xml to be found in for instance Spring context or through the JSF EL context (this allows a single definition of a validator to be shared) KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0.1 to 1.1rc1 -------------------------------------------------------------------------------- BUGS fixed: - Fixed webtest of spring, was broken in Tomcat 5.5 - Fixed bug with jv-ui:validate tag, which only resolved an expression once. - 1967984 Fixed incorrect documentation for jv-ui:validate component FEATURES/ENHANCEMENTS: - Introduced the option to add your own extensions to JaValid (don't confuse with custom annotations). Allowing you to add anything to it you like. Extensions from 1.0 (Spring / JSF) are refactored to the new extensions standard as well. Check the docs on how to add a new extension! - Added Database extension for validation. Using available datasources (from container or handmade). Check out the docs how to use this! - Added @DbNumCheck annotation which provides a powerful database check, including specialized EL support in the queries. - Added JavalidValidationCallbackHandler to be passed when calling a validateObject() method. Allows for customization before / after validation. - Added plural annotations for all existing validation annotations, that is you can use a validation annotation multiple times on the same field/method e.g @MinLengths(values={@MinLength(..),@MinLength(..)}. The original way from 1.0 works still fine too. Check the docs how to add this to your own annotations! (SF: 1992025 Support use of similar annotations on same field/method) - Added @DateCheck annotation, which allows to check dates (equals, more, less etc). - Added support for field validation through the jv-ui tag (was only method) - ValidatorSupport, ReflectionSupport, XMLSupport, JsfSupport, JsfMessageConverter refactored, all methods are static final and the constructors are private. - Added a new web test project which has jsf 1.2 with facelets, as sample, but as a test as well. KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0 to 1.0.1 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1963863 Code is now independent of JSF version by introducing JsfFacade -------------------------------------------------------------------------------- Changes from 1.0-rc2 to 1.0 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1954319 Provide selective global message support 1955130 Add BigInteger / BigDecimal support 1956675 Add Collection size check annotation -- Refactored JvValidator to JavalidValidator (check custom annotations!) -- Added more examples NOTES: None. -------------------------------------------------------------------------------- Changes from 1.0-rc1 to 1.0-rc2 -------------------------------------------------------------------------------- BUGS fixed: 1944076 Inheritance validation fails in some cases 1946399 Cannot use core library directly, noclassdeffounderror FEATURES/ENHANCEMENTS: -- Added a few more examples. NOTES: None.

    posted 253 days ago

  • JaValid 1.2-rc1 file released: javalid-release-bin-1.2-rc1.zip

    -------------------------------------------------------------------------------- Changes from 1.1 to 1.2-rc1 -------------------------------------------------------------------------------- FEATURES/ENHANCEMENTS: - Core rewritten from scratch, optimization of code and maintainability (it is fully backwards compatible). - Introduced advanced caching, once a class has been retrospected it is cached. The next time a simalar class is encountered, the cache is used. This works for inheritance hierarchies as well. - Annotations are registered by default now (for core and extensions), * Extensions register their annotations as soon as they are enabled. This reduces unnecessary configuration. * Update your configuration file if you used one! * Remember: the core can always be used without any configuration! - Removed the setValueToNull option in the constructors of the AnnotationValidors (jv-value-to-null-if-empty option removed from jsf too), instead just use @NotEmpty annotation in these cases. - JavalidValidator interface introduces complex validation option. Therefore refactored all existing validators (they now extend AbstractJavalidValidator). The change is backwards compatible if you let any custom 1.1 validators extend AbstractJavalidValidator. - Added new validation annotations: * @DateBefore Validates that a date is before another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateAfter Validates that a date is after another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateEqual Validates that a date matches another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. * @DateNotEqual Validates that a date does not equal another date in the business model using expressions. Comparison can be done on dates only, dates with time and milliseconds. - Added support for classlevel annotation validations as well as introduced several of these new type of annotations: * @NotNullAll All values for this annotation must be non-null. Values are given as expressions and can 'walk' around the object tree if needed. * @NullOrNotNullAll All values for this annotation must be non-null or all must be null. Values are given as expressions and can 'walk' around the object tree if needed. * @NotEmptyAll All values for this annotation must be non-empty. Values are given an as expressions and can 'walk' around the object tree if needed. * @EmptyOrNotEmptyAll All values for this annotaton must be non-empty or all be empty. Values are given as expressions and can 'walk' around the object tree if needed. Can be used for values of type: java.lang.String,java.lang.StringBuffer,java.lang.StringBuilder, all arrays,java.util.Collection and java.util.Map. - Added MessageCode resolver, which allows to resolve message codes. - Added automatic message resolving (if enabled) for validation messages. - @ValidateDefinition now allows you to override the default location of annotations by explicitly setting it to method or field for a given class. - Added @StopValidation annotation, which allows to stop processing the annotated field / method (in addition to what annotations provide). - @JvGroup is not required anymore on methods/fields/class if you need default validation (without groups or other options), it will use the default group then (which is "1") - Added Spring AnnotationValidatorBeanPostProcessor (contributed by Scott Battaglia) which allows for validation of Spring Beans in an automated way. - @MinLength / @MaxLength / @BetweenLength added support for byte length comparison in addition to the default character comparison. (SF 2136098). - @NotEmpty improved, it can be annotated on java.lang.String, java.lang.StringBuffer, java.lang.StringBuilder, any array, java.util.Collection and java.util.Map - Added option to provide configuration file in AnnotationValidator as an URL (was String only). - The default jv-config.xml has been renamed to jv-config-method.xml (which is the same as the old jv-config.xml) and a new one has been added named jv-config-field.xml. The new one defines that annotations should be on fields (the default configuration has methods). -------------------------------------------------------------------------------- Changes from 1.1rc1 to 1.1 -------------------------------------------------------------------------------- Bugs fixed: - Loading of Spring defined datasource fails -toString() ValidationMessage causes a nullpointer if array with null values is passed. - If JSF is detected, incorrect elcontext is loaded for database extension - Integration issues Spring datasource and database extension - validateProperty now properly calls beginValidation and afterValidation to assure that extensions can initialize/cleanup properly (just as is the case with validateObject). FEATURES/ENHANCEMENTS: -Loading of config file in debug mode does not print stacktrace anymore, as this could be confusing (just prints a message instead). - Validator can now also be specified as a bean in the JSF extension in web.xml to be found in for instance Spring context or through the JSF EL context (this allows a single definition of a validator to be shared) KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0.1 to 1.1rc1 -------------------------------------------------------------------------------- BUGS fixed: - Fixed webtest of spring, was broken in Tomcat 5.5 - Fixed bug with jv-ui:validate tag, which only resolved an expression once. - 1967984 Fixed incorrect documentation for jv-ui:validate component FEATURES/ENHANCEMENTS: - Introduced the option to add your own extensions to JaValid (don't confuse with custom annotations). Allowing you to add anything to it you like. Extensions from 1.0 (Spring / JSF) are refactored to the new extensions standard as well. Check the docs on how to add a new extension! - Added Database extension for validation. Using available datasources (from container or handmade). Check out the docs how to use this! - Added @DbNumCheck annotation which provides a powerful database check, including specialized EL support in the queries. - Added JavalidValidationCallbackHandler to be passed when calling a validateObject() method. Allows for customization before / after validation. - Added plural annotations for all existing validation annotations, that is you can use a validation annotation multiple times on the same field/method e.g @MinLengths(values={@MinLength(..),@MinLength(..)}. The original way from 1.0 works still fine too. Check the docs how to add this to your own annotations! (SF: 1992025 Support use of similar annotations on same field/method) - Added @DateCheck annotation, which allows to check dates (equals, more, less etc). - Added support for field validation through the jv-ui tag (was only method) - ValidatorSupport, ReflectionSupport, XMLSupport, JsfSupport, JsfMessageConverter refactored, all methods are static final and the constructors are private. - Added a new web test project which has jsf 1.2 with facelets, as sample, but as a test as well. KNOWN ISSUES: - LinkageError with javax.el.* If you deploy to an application server that already has an el-api.jar in its classpath (such as Tomcat 6 or JBoss 4.2 etc), you may encounter a LinkageError classloader issue. To solve this you must NOT deploy an el-api yourself with your application, nor deploy the juel-api.jar file (juel-impl is required!). Another solution might be to force classloading your (web)application libraries first. Check the documentation of your container on how to do this. -------------------------------------------------------------------------------- Changes from 1.0 to 1.0.1 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1963863 Code is now independent of JSF version by introducing JsfFacade -------------------------------------------------------------------------------- Changes from 1.0-rc2 to 1.0 -------------------------------------------------------------------------------- BUGS fixed: None. FEATURES/ENHANCEMENTS: 1954319 Provide selective global message support 1955130 Add BigInteger / BigDecimal support 1956675 Add Collection size check annotation -- Refactored JvValidator to JavalidValidator (check custom annotations!) -- Added more examples NOTES: None. -------------------------------------------------------------------------------- Changes from 1.0-rc1 to 1.0-rc2 -------------------------------------------------------------------------------- BUGS fixed: 1944076 Inheritance validation fails in some cases 1946399 Cannot use core library directly, noclassdeffounderror FEATURES/ENHANCEMENTS: -- Added a few more examples. NOTES: None.

    posted 253 days ago

Rate and Review

Be the first person to add a text review.

Would you recommend this project?






<

Related Projects

Thanks for your rating!

Would you also like to write a review?





Skip Review