Fix maintain_migrate validation issues

This should resolve issues #41 and #47. This also fixes a bug with domain validation in which underscores were not allowed and the total length was permitted to exceed 253.