refactored the plugin to support list validation