Add validator and refactor into action Flags