refactor validation component and plugins