validator problem

i want make custom validator like :

function compareDate(item, validator, value) {        
	var otherFieldValue = eval(validator.widgetId + ".getSelectedRecord()." + validator.otherField)
	return (value.getTime() >= otherFieldValue.getTime());
};

Validator.addValidator("compareDate", compareDate);

code in the ds.xml

<field name="validDate"	    title="Valid Date"	   type="date"    width="12%"       required="true"/>
<field name="expiryDate" 	title="Expiry Date"    type="date"	  width="12%"       required="true">
<validators>
       <validator type="compareDate" otherField="validDate" widgetId="adminBiList"
             errorMessage="validDate must be less than expiryDate."
       />                           
</validators>
</field>

when the compareDate return false it’s work fine.but when it return true the widget will show a error icon and errorMessage is “No built-in validator named”
how about this problem? how to fix it ?