Skip to content

Commit

Permalink
Update src/auto-check-element.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
srt32 authored May 24, 2024
1 parent 6cde2e8 commit a8f6b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auto-check-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('')
}
Expand Down

0 comments on commit a8f6b09

Please sign in to comment.