added code in validation.js