Improved input checking for role editor.