Closed pixelead0 closed 1 year ago
Thanks and sorry for taking so long to respond.
I think this is already basically the regexp that is in use, see stdnum.mx.rfc.validate(). The biggest difference is that in python-stdnum the regexp is split up because the number is parsed to extract the type and do other validations.
If you know of any numbers that are not correctly validated, please let me know.
Closing this for now. If there are any numbers that are not correctly validated, feel free to re-open this issue.
^(([ÑA-Z|ña-z|&]{3}|[A-Z|a-z]{4})\d{2}((0[1-9]|1[012])(0[1-9]|1\d|2[0-8])|(0[13456789]|1[012])(29|30)|(0[13578]|1[02])31)(\w{2})([A|a|0-9]{1}))$|^(([ÑA-Z|ña-z|&]{3}|[A-Z|a-z]{4})([02468][048]|[13579][26])0229)(\w{2})([A|a|0-9]{1})$
For validated date YYYY-MM-DD
source: https://gist.github.com/gerardorochin/5718313