Add keyscope name validation #1648