javascript cleanup, create-only validation