adopted-ember-addons / adopted-ember-addons/ember-validators

The date validator has a different allowBlank validation

Offen
#105 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
23
Forks
38
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi! :wave:

While working with [ember-changeset-validations](https://github.com/poteto/ember-changeset-validations), which uses this addon quite extensively, I saw there was an "inconsistency" in the behaviour of the date validator's `allowBlank` option, which checks nullish values and empty strings instead of using Ember's util `isEmpty`, as per all other validators ([cf.](https://github.com/offirgolan/ember-validators/blob/1568f472eb5d9851222b9944521ff1ba529641dd/addon/date.js#L29)).
I also saw that was introduced when removing Moment ([cf. commit](https://github.com/offirgolan/ember-validators/commit/f829984c8c28152f6e15d0b091308583fb1ac997)). Was it meant to be?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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