2 articles JSR Validation

Spring Data MongoDB and JSR Validation using Lazy DBRef

The Problem Recently using MongoDB and Spring Data I encountered an interesting issue. Saving an Entity  which was loaded by @DBRef(lazy = true) wasn’t possible together with the activated ValidatingMongoEventListener. Each time the following error occurred:

The Issue Well looking into the details it is quite clear — as an dynamic proxy is passed to the validation which fields…

JSR 303 Validation for Dates

A common case is to validate date inputs in Java e.g. to avoid the nice and friendly typos like 06/01/1500. Nevertheless by default where is not to much support to handle this very common case. So let’s fix this together: Annotation first The first we need is a JSR annotation which we use to annotate…