Checks that constant names conform to the specified format