You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a validate function is defined for a custom field of type 'relation' it does not get called when creating or updating an entity with that custom field.
Expected behavior
The validate function should be invoked.
Environment (please complete the following information):
@vendure/core version: 1.1.2
Nodejs version: any
Database (mysql/postgres etc): any
Additional context
The root cause is that relation custom fields are named <name>Id rather than just <name> as is the case with all other types. This difference is overlooked in the validation logic here so those fields do not get validated.
The text was updated successfully, but these errors were encountered:
Describe the bug
If a
validate
function is defined for a custom field of type'relation'
it does not get called when creating or updating an entity with that custom field.Expected behavior
The
validate
function should be invoked.Environment (please complete the following information):
Additional context
The root cause is that relation custom fields are named
<name>Id
rather than just<name>
as is the case with all other types. This difference is overlooked in the validation logic here so those fields do not get validated.The text was updated successfully, but these errors were encountered: