-
-
Notifications
You must be signed in to change notification settings - Fork 173
Open
Description
Environment
- Ember Version: 3.16
- Ember CLI Version: 3.16?
- Ember CP Validations Version: 4
Steps to Reproduce
outerClass:
buildValidations({
innerClasses: [
validator('has-many'),
validator('inline', {
dependentKeys: ['model.innerClasses.@each.foo'],
validate(value) { ... }
}],
});
innerClass:
buildValidations({
foo: validator('presence', { presence: true }),
bar: validator('presence', { presence: true }),
});
- While running the app, cause both the
inlineandhas-manyvalidations to fail. - Fix the problem with
innerClassso all its validations pass, but don't fix theinlinevalidation
Expected results
Validations fail. outerClass.validations.errors should include 1 error with type === 'inline' and attribute === 'innerClasses'
Actual results
Validations pass
Workarounds
Any one of:
- Pass
{ lazy: false }to outerClass'sbuildValidationscall. - Reorder the array passed to outerClass's
buildValidationscall so thehas-manyvalidation is last
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels