Property "dimension" is expected to be entered in the style "2x3" with 2 integers separated by "x"
Property "values" is expected to be something like "12,2,4,2,0,-5" with 6 integers separated by "," while if the dimension is changed to be "1x3" values should be 3 integers.
more generally, I'd like to write Java code that describes the validation of each property editor and the dependency between each other. How can I achieve that?
To implement a custom constraint, you need to implement ValidationService and attach it to the property using @Service annotation. Take a look at DuplicateContactValidationService in the contacts sample.
A ValidationService implementation is responsible for informing the system when the state of its validation is likely to have changed. That's done via the broadcast() method that you see being called in the listener. The listener is attached to properties that are involved in the validation computation during init(). In dispose(), the listener is removed.