Validate hostname field

Ticket:	#5231