Fixes #5860 - correctly error on validation failure

fixes #5860 - added test

fixes #5860 - really added test
Merge pull request #4133 from thomasmckay/5860-actkey-validate

Fixes #5860 - correctly error on validation failure