Paste box validation and clearing