You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug According to manual one can create custom validator with error names without period but such errors are not detected with hasError, i.e. $myForm.hasError("my_error") or $myForm.hasError("minLength") is always false even if validator returns valid = false.
No such problem when period is used in error name i.e. $myForm.hasError("my.error").
Checked in svelte-forms 2.3.1.
Expected behavior
hasError or manual should be fixed. Standard error names like minLength should work or be adjusted to allow to be detected using hasError.
The text was updated successfully, but these errors were encountered:
pboguslawski
changed the title
Underscores don't work in custom validator names
Custom validator names without period are not detected in hasError
Sep 28, 2023
pboguslawski
changed the title
Custom validator names without period are not detected in hasError
Error names without period are not detected in hasError
Sep 28, 2023
Describe the bug
According to manual one can create custom validator with error names without period but such errors are not detected with hasError, i.e.
$myForm.hasError("my_error")
or$myForm.hasError("minLength")
is always false even if validator returnsvalid
=false
.No such problem when period is used in error name i.e.
$myForm.hasError("my.error")
.Checked in svelte-forms 2.3.1.
Expected behavior
hasError or manual should be fixed. Standard error names like
minLength
should work or be adjusted to allow to be detected usinghasError
.The text was updated successfully, but these errors were encountered: