improved validation exception handling