edit event js validate