Date Validation according to different type I met a problem when create a new content.

I created a content type, it has a field named Type, this field have two values.
When select "normal", another field Date will be hidden. When select "renewal", another field Date will display.

Now I want to compare start date and end date before save this content.
On one way, I used field validation, but it always give warning for both "normal" and "renewal".

On the other, I add new rules to compare the date, but it gives warning always after saved the content.

Anyone could help me to solve this problem? very appreciate for this.
use strtotime() on both the date fields and then compare that value in the validate function of the form.