Refactor validation warning popup