OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Change Address validation

This topic contains 18 replies, has 7 voices, and was last updated by  Bhavesh Tailor 7 years, 2 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #33945

    cardiac
    Participant

    Hi all,

    I wanted to change the OroAddressBundle validation of the Address entity.

    In the OroAddressBundle you have:

    But I want to remove these validations. I don’t want the fields to be validated!

    I had read this article, but didn’t helped me though.

    Can you help me with this? Is there a possibility to remove/overwrite the validation?

    PS: It’s ok for me if I just overwrite/remove the validation of Oro\Bundle\AddressBundle\Entity\Address and pre fill the country field.

    Regards

Viewing 3 replies - 16 through 18 (of 18 total)
  • Author
    Replies
  • #33961

    Bhavesh Tailor
    Participant

    Hello ,

    Is there any way to override OroCRM/Bundle/SalesBundle/Resources/config/validation.yml form our custom bundle . i did try validation_groups into custom folder opportynity_type.php like

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
    $resolver->setDefaults(
    array(
    ‘data_class’ => ‘OroCRM\Bundle\SalesBundle\Entity\Opportunity’,
    ‘intention’ => ‘opportunity’,
    ‘validation_groups’ => [‘ms_edit’]
    )
    );
    }

    it’s not work for opportunity datagrid inline edit . Please suggest me how can i solve this issue .
    As Per mention into above post while i remove customer constraint from validation.yml and clear the cache it’s work for me but with this constraint i am not able to edit datagrid data .

    Thank You


    Bhavesh

    #33962

    Bhavesh Tailor
    Participant

    Hello ,

    Is there any way to override OroCRM/Bundle/SalesBundle/Resources/config/validation.yml form our custom bundle . i did try validation_groups into custom folder opportynity_type.php like

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
    $resolver->setDefaults(
    array(
    ‘data_class’ => ‘OroCRM\Bundle\SalesBundle\Entity\Opportunity’,
    ‘intention’ => ‘opportunity’,
    ‘validation_groups’ => [‘ms_edit’]
    )
    );
    }

    it’s not work for opportunity datagrid inline edit . Please suggest me how can i solve this issue .
    As Per mention into above post while i remove customer constraint from validation.yml and clear the cache it’s work for me but with this constraint i am not able to edit datagrid data .

    Thank You


    Bhavesh

    #33963

    Bhavesh Tailor
    Participant

    Hi ,

    Please help me.

    I did remove b2b customer field from opportunity thats why into my table orocrm_sales_opportunity customer_id is null. While i trying to edit status,probability etc. then i got error “This value should not be blank.” . While i remove code from

    OroCRM/Bundle/SalesBundle/Resources/config/validation.yml

    customer:
    – Valid: ~
    – NotBlank: ~

    Then I am able to update fields . How can i override this validation.yml for inline edit datagrid

    Is there any way to override OroCRM/Bundle/SalesBundle/Resources/config/validation.yml form our custom bundle . i did try validation_groups into custom folder

    /Workspace/orocrmdemo/src/MarketSnap/Bundle/SalesBundle/Form/Type/OpportunityType.php

    or also try

    Workspace/orocrmdemo/src/MarketSnap/Bundle/SalesBundle/Form/Extension/OpportunityTypeExtension.php

    like

    it’s not work for opportunity datagrid inline edit . Please suggest me how can i solve this issue .
    As Per mention into above post while i remove customer constraint from validation.yml and clear the cache it’s work for me but with this constraint i am not able to edit datagrid data .

    Thank You


    Bhavesh

Viewing 3 replies - 16 through 18 (of 18 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top