basic implementation of validation levels

Closes #6213
Maybe change the text for "Key %s can not be upgraded by new key" ?.Don't know, but "Key can not upgrade" seems a bit strange. Only a detail, though, not so important.