added some validation for post/patch data. Its hacky right now, need a separate validation layer