added js file and validation to trainig project