diff --git a/src/auto-check-element.ts b/src/auto-check-element.ts index 08166fb..fa659da 100644 --- a/src/auto-check-element.ts +++ b/src/auto-check-element.ts @@ -244,7 +244,7 @@ async function check(autoCheckElement: AutoCheckElement) { const state = states.get(autoCheckElement) // If some attributes are missing we want to exit early and make sure that the element is valid. - if (!src || (httpMethod && !csrf) || !state) { + if (!src || (httpMethod === 'POST' && !csrf) || !state) { if (autoCheckElement.required) { input.setCustomValidity('') }