refactor keyusage validator