Restricts document numbers to 6 characters, being A-Z, 0-9 or a hyphen
Restricts activation codes to 8 characters, being A-Z or 0-9
Replaces test-values with 'real-life' values instead of 'dumb' dummy-values like 'REGCODE'
Debatable:
The value for an 'unknown' document was a non-default character (I think it's an 'En Dash' from Extended ASCII table No. 150), but I couldn't get the regexp to match it. Since it really doesn't seem to represent anything (seems to be stored as NULL in the database), I've changed the code to accept null for unknown documents.
Should we accept anything other than A-Z + 0-9 for document numbers anyway? The dialog asks the RA for the last 'six characters'. We may want to disregard any hyphen or other special characters.
P.S.: There is a warning about an undefined method in the tests that is unrelated to this PR, but may need fixing by the maintainers. Should the code say RecoveryTokenStatus::active instead?
This PR:
Debatable:
null
for unknown documents.Related: https://github.com/OpenConext/Stepup-RA/pull/310
P.S.: There is a warning about an undefined method in the tests that is unrelated to this PR, but may need fixing by the maintainers. Should the code say
RecoveryTokenStatus::active
instead?