worked on my js validate and edit functions.