fix the script wizard.js add function validate