Can you put a comment to describe the validation logic in this method?