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

sam-piper opened this Issue Jul 7, 2017 · 0 comments


None yet
3 participants

sam-piper commented Jul 7, 2017

I'm submitting a bug report

  • Library Version:

Please tell us about your environment:

  • Operating System:
    Windows 10

  • Node Version:

  • NPM Version:

  • Browser:

  • 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