I made a custom rule for the jQuery validation plugin and I want it to be applied to a field that is not required. So, when I enter something in the field it should be checked but if it's empty it shouldn't be checked by the custom rule.
If I don't set required to true and check this.optional(element) i get dependency-mismatch.
Is there a way to do this?