By
That is the twenty eighth in our DecEmber collection–”Countdown to The New 12 months: 31 Days of Ember Addons”. We plan to focus on a brand new addon every day till the brand new yr, and we hope you may be a part of us for the enjoyable!
Day 28
For the twenty eighth version of Countdown to The New 12 months we will take a
take a look at ember-changeset
.
What It Does
Managing information related to varieties can generally be unwieldy. Because of this, we’ve borrowed ideas from the Elixir group to provide the potential to stop mutating the underlying object till the final attainable second when you’ve got determined to use the modifications and the info is legitimate. This purposeful method to validations has proved to be fairly helpful.
This addon works along side ember-changeset-validations
to offer you out of the field validations to validate the format of a sure enter, guarantee passwords go a minimal safety threshold and even allow you to construct your personal customized validator!
Why I Like It
Lately I rewrote ember-changeset
to repair lengthy excellent bugs, help Octane patterns and make the most of @tracked
. Because of this, not solely are you able to validate and apply modifications to high stage keys (individual
), nested keys equivalent to individual.firstName
might also be used. As well as, on the similar time @pzuraq
‘s weblog submit Do You Want EmberObject? got here out, we eliminated EmberObject
, providing you with a less complicated base class to work with. The bottom performance has been extracted to validated-changeset
to be used exterior of Ember purposes as properly! At the moment this addon continues to be in v3
beta. We plan to exit the beta interval and do a correct 3.0.0
launch within the close to future for apps supporting ember-source
>= 3.13. .
Ember has additional memorialized itself with the OOP group. Because of this, a purposeful method to mutating state is an efficient device to have in your toolbelt!
Do you employ ember-changeset
or one thing related? We might love to listen to about Ember addons you like for DecEmber within the feedback under!