Validation Extension
This is a simple extension to Morphia to process JSR 303 Validation Annotations.
Using
Add this at the start of your application (or wherever you create your morphia instances).
new ValidationExtension(morphia);
``
Implementation
This is a lightweight wrapper around the JSR 303 API. It installs a simple global entity interceptor which listens to all life cycle methods needed for validation. You can use any implementation of JSR 303 by just adding it to the classpath.
You can look at the code here.