Perform validation on previewing script
Prevent leave message on preview script