Update edit.js

checkRequired function - highlighting errors and removing error notices and colours when error removed