Put the validation in a module method.
Add validations for domains