ember-model-validator
Installation
SKILL.md
ember-model-validator Reference
Overview
ember-model-validator provides declarative client-side validation for Ember Data models. A3 uses it in 10 models (client, enrollment, contract, agency, user, dependent, carrier, plan, agent, payment) to validate data before saving to Firestore. Validations run client-side and produce error objects that are rendered inline in forms.
Adding Validations to a Model
Validations are defined as a static validations property on the model class. Import the validateModel mixin and apply it:
import Model, { attr } from '@ember-data/model';
import { buildValidations, validator } from 'ember-model-validator';