fixed NameError: global name 'ValidationError' is not defined