added format validation for location