Add validation to contact api.