OVal - the object validation framework for Java

Build Status License Changelog Download

  1. What is it?
  2. Java Compatibility
  3. User Guide
  4. Articles about OVal
  5. Projects using OVal
  6. License

What is it?

logo

OVal is a pragmatic and extensible validation framework for any kind of Java objects (not only JavaBeans). Constraints can be declared with annotations (@NotNull, @MaxLength), POJOs or XML.

Custom constraints can be expressed as custom Java classes or by using scripting languages such as JavaScript, Groovy, BeanShell, OGNL or MVEL.

Besides field/property validation OVal implements Programming by Contract features by utilizing AspectJ based aspects or via Spring AOP. This for example allows runtime validation of constructor/method arguments.

Java Compatibility

OVal 1.x requires Java 5 or newer

OVal 2.x requires Java 8 or newer

Binaries

Binaries are available via the Bintray JCenter Maven repository.

You need to add this repository to your Maven settings.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <profiles>
    <profile>
      <repositories>
        <repository>
          <id>central</id>
          <name>bintray</name>
          <url>https://jcenter.bintray.com</url>
          <snapshots><enabled>false</enabled></snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>bintray</activeProfile>
  </activeProfiles>
</settings>

Then you can add OVal as a dependency to your pom.xml:

<dependency>
  <groupId>net.sf.oval</groupId>
  <artifactId>oval</artifactId>
  <version>[VERSION_GOES_HERE]</version>
</dependency>

User Guide

The user guide is available USERGUIDE.md

Articles about OVal

There exist some articles and blog entries talking about and/or referencing OVal:

Projects using OVal

License

All files are released under the Eclipse Public License 2.0.