Javascript and validations added to the file