adding js validations