0

As part of my project I have the credit card month and year as two different fields,

<field name="expiry-month">
    <field-validator>
        ...
    </field-validator>
</field>
<field name="expiry-year">
    <field-validator>
        ...
    </field-validator>
</field>

Now, I want to validate the values of these two fields as together so that the credit card expiry month and year are not in past.

How can I do that within XML?

Thank you.

Roman C
  • 48,723
  • 33
  • 63
  • 158
Rahul Vala
  • 593
  • 7
  • 13
  • You'd need either a plain `` with an expression that does the date comparison (but likely not practical), a custom validator, or use a combination. A custom validator is the route I'd take if I was insistent on doing it "all" via XML (obviously the validator itself is something Java-y). – Dave Newton May 07 '22 at 16:28

0 Answers0