Bug Report B134084
Visible to All Users

If several rule attributes are used for a property, only one of them is checked

created 16 years ago

Hi,
There appears to be a bug in validation that I do not believe was there before. It arises from the use of the following pattern:
    [RuleFromBoolProperty("TestSave", DefaultContexts.Save, "Cannot save")]
    [RuleFromBoolProperty("TestDelete", DefaultContexts.Delete, "Cannot delete")]
    public bool ValidationProperty
    { … }
It appears that the validation system only recognises one of these rules but it is random which one is enforced and which is ignored.
To reproduce, you need to follow the reproduction instructions but noting that the rule that is enforced will be random so you will have to try one of two routes.
Thanks,
Jascha
Steps to Reproduce:
Run app.
Create a new Domain Object 1
Try to save with a MyProperty value of 0 (illegal). This may be allowed or may not.
If it was allowed then you can see that the save rule was ignored.
If it was not allowed then set the the value to 1 and save successfully.
Then change the value back to 0 and delete - this will be allowed even though it is invalid.

Show previous comments (4)
Dennis Garavsky (DevExpress) 16 years ago

    Hello Jascha,
    Thank you for the feedback. We are sorry that this workaround doesn't meet your requirements. Unfortunately, we don't have an alternative variant for this version.
    >>
    When can we expect 8.3.5?
    <<
    If all goes according to our plan, we will release version 8.3.5 at the beginning of March. Unfortunately, we cannot provide a more exact time frame.
    BTW, right now you can use the intermediate XAF and DXP builds, in which this problem is fixed. I uploaded the public fixes when I answered you for the first time. Is there any problem with these fixes? Why don't you use them?
    We are looking forward to hearing from you and ready to help you in case we can do more for you here.
    Thanks,
    Dennis

      Hi Dennis,
      The fix is for 8.3.4 and I am using 8.3.3 and I am not happy to release code based on intermediate builds.
      Jascha

      Dennis Garavsky (DevExpress) 16 years ago

        Hi Jascha,
        OK, I understand you, thanks for informing us and sorry for the inconvenience. Please let me know in case of any problem.
        Regards,
        Dennis

        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.