In employment, things are different in small companies but in a very small company this is necessary because you cannot recruit a woman of obvious child bearing disposition (how you judge that is somewhat tricky but you have to do your best; one generally goes on age) into a critical job especially as in ~90% of cases they exercise the maternity leave option in full but never come back.
Take care Peter - Employers have lost cases at tribunal in the UK for such discrimination. You're an employer and might want to consider how such a comment might be used against you by someone who did not get a job after interview.