This checks that a schema complies with the documented constraints on which values are valid. It is primarily intended for use in tests.