import CodeError in validation.py, since it uses it