Updated class name validator implementation.