That said, online surveys often fail at this, for instance having “gender” questions with just the 2 options (they should at least have an “other”) or only accepting as “valid” answers that do not fit the entire population (For example, a survey for doctors with no explicit age cutoff limited ages to <99; at the time, there was one practicing doctor older than that—he would just have been given an error message that his age was “invalid”.)
That said, online surveys often fail at this, for instance having “gender” questions with just the 2 options (they should at least have an “other”) or only accepting as “valid” answers that do not fit the entire population (For example, a survey for doctors with no explicit age cutoff limited ages to <99; at the time, there was one practicing doctor older than that—he would just have been given an error message that his age was “invalid”.)