fix(forms): preserve regex quantifiers and use inline constraint errors

This commit is contained in:
Clintchiz committed 2026-08-26 17:13:07 +05:30
1 parent 1dd60ded0d
commit fe40cc56df
13 files changed
+132 -26

No files matched your search

+3 -1
View File
@@ -40,7 +40,9 @@ size: string = "default"
output[nameEvent]({ value: sourceEvent.currentTarget.value, name: name, sourceEvent: sourceEvent })
}
client function handleInvalid(sourceEvent) {
validationError = sourceEvent.currentTarget.validationMessage
sourceEvent.preventDefault()
sourceEvent.stopPropagation()
validationError = error || (sourceEvent.currentTarget.validity.valueMissing ? "This field is required." : "Enter text within the allowed length.")
sourceEvent.currentTarget.setAttribute("aria-invalid", "true")
sourceEvent.currentTarget.closest(".wrn-next--field").setAttribute("data-invalid", "true")
output.invalid({ value: sourceEvent.currentTarget.value, name: name, message: validationError, sourceEvent: sourceEvent })