Issue #2241735 by tim.plunkett: Throw an exception when form errors are set outside of validation.