poteto / ember-changeset-validations

Validations for ember-changeset
http://bit.ly/ember-changeset-demo
Other
220 stars 98 forks source link

Harmonize blank option #318

Open frykten opened 2 years ago

frykten commented 2 years ago

Hello!

This is linked to my proposal in #317 .

So I changed the allowBlank's check for the date validator to Ember's util isEmpty, as per the ones in the ember-validators (and therefore the ones in the other validators of this addon, since all but date use ember-validators). However, while doing that, I saw that ember-validators does not use isEmpty for their dates (exceptionally) and instead make a custom check to only nullish values and empty strings (cf.). Maybe you would copy that, instead? I'm opening an issue on their side to ask them why this inconsistency.

Also, I updated the tests of the other addons to harmonize their checks and reflect the behaviours.