Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @emilywieja,

    Thanks for reaching out to us.

    Please note that the pop-up error messages are not controlled by our plugin. In HTML5 these are controlled by all browsers and will look different in each browser. There is no way to disable it other than adding custom code to create custom error notifications.

    Thread Starter emilywieja

    (@emilywieja)

    Thank you! That is helpful. I was able to add some code to create the custom error notification.

    const input = document.querySelector('input[name^="INTERESTS"]');
    
        input.addEventListener('invalid', function (event) {
          if (event.target.validity.valueMissing) {
            event.target.setCustomValidity('Please select at least one option.');
          }
        })
    
        input.addEventListener('change', function (event) {
          event.target.setCustomValidity('');
        })
    Plugin Contributor Lap

    (@lapzor)

    Thanks for sharing your code!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JavaScript to require at least 1 selection – change error message’ is closed to new replies.