this fiddle works as intended - it displays a warning when the user enters an invalid country code.
This other fiddle, without the form
element, doesn't work. It seems the input's pattern
attribute needs a form
to validate. By the way, I'm doing a complex page without forms and I' d like to validate my input fields with `pattern
. Is there a way to do that?