This feature was suggested by @andylaw and would enable the nhs_number.is_valid(nhs_number) function to be passed an optional parameter that will enable it to only return True if the number is valid for the region selected.
I would propose an optional validation_region name in the is_valid function, which if present constrains the validation further so that if the number is numerically (Modulo11 check digit) valid, but is from a different region, then the function would return False (not valid)
This feature was suggested by @andylaw and would enable the
nhs_number.is_valid(nhs_number)
function to be passed an optional parameter that will enable it to only return True if the number is valid for the region selected.I would propose an optional
validation_region
name in theis_valid
function, which if present constrains the validation further so that if the number is numerically (Modulo11 check digit) valid, but is from a different region, then the function would returnFalse
(not valid)