OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform Want to override ProductBundle's validation.yml

This topic contains 2 replies, has 2 voices, and was last updated by Andrey Yatsenko Andrey Yatsenko 4 weeks, 1 day ago.

  • Creator
    Topic
  • #40682

    Shahriar
    Participant

    I want to override ProductBundle’s validation.yml to allow validation for a 3rd product type, “giftcard”.

    I have tried these but it still have a violation of product type not being valid:

    Trial 1:

    Trial 2:

    Please advise what am I doing wrong or if there is a way to replace that callback function with my custom array?

    We want to avoid overriding the Product Entity with another custom type. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #40683

    Shahriar
    Participant

    Just to clarify, the First screenshot is how validation.yml is set in Oro’s ProductBundle.

    The Trial screenshots are how I tried to overwrite from my own custom bundle’s validation.yml.

    • This reply was modified 1 month ago by  Shahriar.
    #40692
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    You can override it with the validation groups. But you should note that there is a lot of code that relies on the fact that there are only two types of products at the system, so it can be hard to override other parts, as this functionality is not intended to be extensible.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No