We shortly thought about this back when working on
ConstraintMapping mapping = ...; mapping.type( Order.class ) .property( "code", FIELD ) .check( (String s) -> s.startsWith("ON" ) );
I.e. no constraint annotation is involved here at all.