mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
adjust validation message
This commit is contained in:
1 parent
99ca0136ed
commit
abd498dd33
8 files changed
+133
-47
No files matched your search
@@ -1,14 +0,0 @@
|
||||
export default class extends HTMLElement {
|
||||
connectedCallback () {
|
||||
const input = this.querySelector('input')
|
||||
const invalidMessage = this.dataset.invalidMessage || ''
|
||||
|
||||
input.addEventListener('invalid', () => {
|
||||
input.setCustomValidity(input.value ? invalidMessage : '')
|
||||
})
|
||||
|
||||
input.addEventListener('input', () => {
|
||||
input.setCustomValidity('')
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user