Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error names without period are not detected in hasError #113

Open
pboguslawski opened this issue Sep 28, 2023 · 0 comments
Open

Error names without period are not detected in hasError #113

pboguslawski opened this issue Sep 28, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@pboguslawski
Copy link

pboguslawski commented 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 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.

@pboguslawski pboguslawski added the bug Something isn't working label Sep 28, 2023
@pboguslawski 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants