Fix form validation to support empty domain