The input s to is_valid should be a full passport string (what you get after splitting by double new lines). It does parsing + validation at once and eagerly exits if any field validation fails.
Yes, I know - very cursed. 'twas just for fun, and to prove a point ;)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
would anyone be interested in a solution written entirely in C, without regex or hashtables
The input
s
tois_valid
should be a full passport string (what you get after splitting by double new lines). It does parsing + validation at once and eagerly exits if any field validation fails.Yes, I know - very cursed. 'twas just for fun, and to prove a point ;)