Passport verification for child's Zip Card not working

Hello,

I tried to fill in the zip card application for my son this evening.

The passport verification screen insists on 10 numbers for the passport number but Irish passports have 2 letters then 8 numbers so a regexp of “[A-Z][A-Z][0-9]{8}” would work but the current [0-9]{10} is not.
Also, the 6th field is wrong - only 1 number on my son’s passport - site demands 2.

This, I think, is the broken line:

    var passportRules = _aureliaValidation.ValidationRules.ensure('passportNumber').matches(new RegExp('^\\d{10}$')).withMessage('Enter 10 numbers').ensure('nationality').displayName('Field 2').matches(new RegExp('^[a-zA-Z]{3}$')).withMessage('Enter 3 letters').ensure('dob').matches(new RegExp('^\\d{7}$')).withMessage('Enter 7 numbers').ensure('passportGender').displayName('Field 4').matches(regexGender).withMessage('Enter 1 valid character').ensure('expiry').matches(new RegExp('^\\d{7}$')).withMessage('Enter 7 numbers').ensure('personalNumber').matches(new RegExp('^\\d{2}$')).withMessage('Enter 2 numbers') // .ensure('expiryDay')

Needs to match [A-Z][A-Z][0-9]{8} for Irish passport numbers and [0-1]{1} for the last number field. Not sure how to add that plus the 10 number for the GBR passports (too long a day) :slight_smile:

Many thanks my brothers and sisters. :+1:

  • ZeemoLeemo
    xx

Welcome…

Perhaps you might help out by posting the URL concerned? It’s hard for this community forum to help without the basics…

I suspect, however, that as you aren’t wanting help with the APIs, this is isn’t likely to the be place for help with this.

1 Like