Validating currency field against another currency field


How can I validate a number field against another number field in the same form? Both number fields are set to currency and I want to check that one value is not larger or equal to the other value. I’ve tried the gform_field_validation filter which works when the field is set to a number but not currency.


Take a look at example 2 here for use of the GFCommon::to_number function to convert that currency to a number before evaluation.