Validations in code could prevent saving configurations with invalid vertical and horizontal positions like making sure 2 child elements does not have the same horizontal and vertical positions etc.
Validations can also be performed to make sure if the ui config does not represent a timecode annotation then the timecodeAnnotationType should be null; The above code snippet is not how the config is directly store in the database. The specifics of the database layout is given below.