posts resource and validation