Modified validateaddress to return a boolean