Ticket T441376
Visible to All Users

Questions about skipping validation for certain objects with aggregated collections

created 8 years ago

[DevExpress Support Team: CLONED FROM Q241649: Validation - Rules for aggregated child objects are checked when saving a master object in a Detail View]
Hi,

So, if I would want to disable this application-wide, I simply omit type check?
Would that be proper approach or is there a better way to accomplish this?

Reason I need this, customers have imported data from previous application which fail many of the validation rules defined in our application.
Because of that, they can not insert new data for records which contain failing records in their nested collection. It even disables fixing this errors because if there are more than one failing objects in a collection it is impossible to fix any data since validation always fails (on other records).
And since there are several dozen of objects like that, I would simply prefer to disable validation for non-edited objects - and also it is not intuitive to our customers that validation errors arise for records they are not changing and it is not possible to explain aggregated collections to average Joe in accounting.

Regards,
Mario

Answers approved by DevExpress Support

created 8 years ago (modified 8 years ago)

Hello Mario,

Yes, you can do this. Alternatively, you can write custom code that will analyze the OwnerObject's metadata or other characteristics.
Another solution would be handling the DevExpress.Persistent.Validation > RuleSet > CustomNeedToValidateRule event, but this is a more wide solution. Let me know in case of any further questions.

    Comments (2)
    MB MB
    Mario Blatarić 8 years ago

      Initial solution (without type check) is fine with me I was just curious if there were better methods.

      Thanks,
      Mario

      Dennis Garavsky (DevExpress) 8 years ago

        You're always welcome, Mario

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.