Ignore:
Timestamp:
3 Jun 2022, 13:55:27 (2 years ago)
Author:
Henrik Bettermann
Message:

JAMB reg number format has changed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/interfaces.py

    r16612 r16957  
    5858#: Regular expression to check jamb_reg_number formats.
    5959check_jamb_reg_number_2 = re.compile(r"^1\d{7}[A-Z]{2}$").match
     60check_jamb_reg_number_3 = re.compile(r"^\d{12}[A-Z]{2}$").match
    6061
    6162def validate_jamb_reg_number_2(value):
    6263    if not check_jamb_reg_number_2(value):
     64        raise NotJAMBRegNumber2(value)
     65    return True
     66
     67def validate_jamb_reg_number_3(value):
     68    if not check_jamb_reg_number_3(value):
    6369        raise NotJAMBRegNumber2(value)
    6470    return True
     
    350356        title = _(u'JAMB Registration Number'),
    351357        required = False,
    352         constraint=validate_jamb_reg_number,
     358        # constraint=validate_jamb_reg_number,
    353359        description = _(u'Use all CAPS when entering the field.'),
    354360        )
     
    707713        title = _(u'JAMB Registration Number'),
    708714        required = False,
    709         constraint=validate_jamb_reg_number_2, # temporarily in 2021
     715        # constraint=validate_jamb_reg_number_2, # temporarily in 2021
     716        constraint=validate_jamb_reg_number_3,
    710717        description = _(u'Use all CAPS when entering the field.'),
    711718        )
Note: See TracChangeset for help on using the changeset viewer.