added js validations