Starting to add validation code to API.