# Validate conditions between variables

**URL:** <https://forum.radzen.com/t/validate-conditions-between-variables/2694>\
**Category:** Uncategorized\
**Created:** [February 18, 2020, 5:35pm UTC](https://forum.radzen.com/t/validate-conditions-between-variables/2694 "2020-02-18T17:35:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruben\_Agustin](https://forum.radzen.com/user_avatar/forum.radzen.com/ruben_agustin/32/2556_2.png) [@Ruben\_Agustin](https://forum.radzen.com/u/Ruben_Agustin)\
**Post date:** [February 18, 2020, 5:35pm UTC](https://forum.radzen.com/t/validate-conditions-between-variables/2694/1 "2020-02-18T17:35:36Z")

</div>

Hello,

In my Radzen project I do have cases where I do need validate a condition between variables. Like for example FinishDate is greater than StartDate and some similar cases.

Is there any way to do it with Radzen validators?

Thank you.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [February 18, 2020, 5:58pm UTC](https://forum.radzen.com/t/validate-conditions-between-variables/2694/2 "2020-02-18T17:58:54Z")

</div>

The [CompareValidator](https://blazor.radzen.com/comparevalidator) would probably help.

---

<div class="post-metadata">

**Author:** ![Ruben\_Agustin](https://forum.radzen.com/user_avatar/forum.radzen.com/ruben_agustin/32/2556_2.png) [@Ruben\_Agustin](https://forum.radzen.com/u/Ruben_Agustin)\
**Post date:** [February 19, 2020, 10:09am UTC](https://forum.radzen.com/t/validate-conditions-between-variables/2694/3 "2020-02-19T10:09:02Z")

</div>

I have tried the CompareValidator and if I use it to compare that two variables are equal like in the passwords example is working great, but when I use it to compare if one variable is greater than the other it does not work as expected. I assume that probably I am using it wrong but since there is no documentation I do not know exactly how should I use the CompareValidator in this case.

Where should I place the condition? In the "Visible" attribute?  
Should I do something different with the "Value" attribute?

Thank you.

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [February 19, 2020, 12:53pm UTC](https://forum.radzen.com/t/validate-conditions-between-variables/2694/4 "2020-02-19T12:53:09Z")

</div>

Indeed this isn't possible at the moment. We will implement a comparison operator feature for the CompareValidator which will allow the developer to set the comparison (equals, not equals, etc). For the time being you can use the **Condition** property of the **Invoke data source method** action.
