Added Validation check to API