js file for validations