A validation library for ember-changeset that uses simple functions and POJOs for composable form validations.
Ember-changeset-validations is a companion validation library for ember-changeset, designed to handle form validations in Ember.js applications. It provides a straightforward, function-based approach to defining validation rules as Plain Old JavaScript Objects (POJOs), enabling developers to create reusable and composable validation maps without complex observers or computed properties.
Ember.js developers building applications with forms that require robust client-side validation, particularly those already using or considering ember-changeset for form state management.
Developers choose this library because it offers a simple, composable validation system that integrates seamlessly with ember-changeset, using plain functions and objects to avoid complex abstractions. Its built-in validators from ember-validators and support for custom synchronous or asynchronous validators provide flexibility while maintaining a clean separation between validation logic and form state.
Validations for ember-changeset
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validation rules are defined as Plain Old JavaScript Objects that can be easily combined using Object.assign, enabling reuse across different forms and components.
Includes a comprehensive set of validators from ember-validators for common cases like presence, length, format, and number, reducing the need to write basic validators.
Supports creating synchronous or asynchronous custom validators as simple higher-order functions, allowing for complex checks such as API-based uniqueness validation.
Designed as a direct companion to ember-changeset, with a template helper that simplifies validation setup and raw error output for internationalization.
Since version 4, ember-changeset must be installed separately, and the library is unusable without it, adding an extra dependency and coupling.
The date validator does not support string inputs, only Date objects or milliseconds, requiring additional parsing logic for date strings from forms.
When creating changesets programmatically instead of using the template helper, developers must use lookupValidator to convert POJOs, adding unnecessary complexity.