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

ValidationController.revalidateErrors() broken in 1.1.1 #456

Closed
sam-piper opened this issue Jul 7, 2017 · 0 comments · Fixed by #460
Closed

ValidationController.revalidateErrors() broken in 1.1.1 #456

sam-piper opened this issue Jul 7, 2017 · 0 comments · Fixed by #460
Assignees
Labels

Comments

@sam-piper
Copy link

I'm submitting a bug report

  • Library Version:
    1.1.1

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:
    6.10.1

  • NPM Version:
    4.4.1

  • Browser:
    all

  • Language:
    TypeScript 2.2.2

Current behavior:
The new function ValidationController.revalidateErrors() is throwing errors when we try to use it.

The error is TypeError: rules[i].indexOf is not a function and occurs in StandardValidator.ruleExists(), in src/implementation/standard-validator.ts:56.

The object resolving at rules[i] is always an instance of Rule<TObject, TValue>, and is never an array, so this function always breaks. It doesn't appear to be called at all for normal validation workflow.

Expected/desired behavior:
There should be no error, and existing rule results should be re-rendered in the UI. We want to use this to reset validation messages when language changes via the aurelia-i18n plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants