adopted-ember-addons / adopted-ember-addons/ember-changeset-validations

Error Importing Validator Class

Offen
#260 13 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
215
Forks
98
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Using version `3.8.0` of both `ember-changeset` and `ember-changeset-validations`, I'm getting an error when importing the `Validation` class for use in a class-based custom validator: `Could not find module ember-changeset-validations/validator`. I have imported the `Validator` class exactly as the docs say:

```
import Validator from 'ember-changeset-validations/validator';

export default class MyValidator extends Validator {}
```

I can't seem to find any `Validator` class within the source code and the [tests for class-based validators](https://github.com/validated-changeset/validated-changeset/pull/76/files#diff-22d221739f9dc3ffd50b561c1f3c1fb7R2176) don't seem to extend the `Validator` class as well.

Removing `extends Validator` (like in the tests) prevents the import error from appearing, however, the validations do not run.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.