expDateFormat top-level property
Recognizes acceptable expiration date formats In plain english the steps are:
- The month:
a '0' followed by a number between '1' & '9 ' or just a number between '1' and '9'
OR
a '1' followed by a number between '0' & '2' - The slash: a '/' (forward slash)
- The year: any combo of 2-4 numeric characters
Implementation
final RegExp expDateFormat = RegExp(r'^((0?([1-9]))|1([0-2]))\/(\d{2,4})$');