Added support for localhost domain name in validation