Improving hostname validation for add.