-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Person has List. Pet is an abstract class. Dog is a pet. Dog has a field called smelly. Cat is a pet. Cat has a field called douchey.
Rule for Person:
pets.douchey, Rules.required
Blows up because on fail-fast field validation it can't find the field douchey on abstract class Pet.
Expected behavior for fail-fast:
Check for all implementations of Pet, see if at least one of them has field douchey. If so, move along, else, throw error.
Expected behavior of rule validation:
When executing rule against path, make sure object has instance of field. If field not present (because no instanceof Cat), move along, else validate. Might need some configurability for this if people really did want to error on the field not being present, but I doubt it.
Metadata
Metadata
Assignees
Labels
No labels