validation methods

Add 2 exceptions
TODO: check
TODO: host validation (ip ...)