validate base, nested and array schemas