• Question

  • The DataAnnotations.CompareAttribute fires ErrorMessage if the values of the compared items are DIFFERENT.

    I would like instead to obtain an error message when they are EQUAL. Is it possible to obtain this?

    Monday, January 20, 2020 12:17 PM

All replies

  • Hi GiorgioITA,

    Thank you for posting here.

    According to your description, your issue is more related to ASP.NET. Therefore, it will be more appropriate to ask your question in ASP.NET Forums

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 28, 2020 6:31 AM