add unit tests for draft 3 'required' objects
fix failing 'required' testcase
refactor conditional logic of 'required' validation
separate 'type' from 'required' validation