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

Error Importing Validator Class

Abierto
#260 13 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
215
Forks
98
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.