File: //opt/alt/python311/lib/python3.11/site-packages/validators/i18n/__pycache__/fi.cpython-311.pyc
�
�;f� � � � d Z ddlmZ ddlZddlmZ ed� � � Zedefd�� � Zedefd �� � Z ed
d�dede
fd
�� � ZdS )zFinland.� )� lru_cacheN)� validatorc �* � t j d� � S )zBusiness ID Pattern.z^[0-9]{7}-[0-9]$)�re�compile� � �E/opt/alt/python311/lib/python3.11/site-packages/validators/i18n/fi.py�_business_id_patternr s � � �:�)�*�*�*r �ssn_check_marksc �h � t j d� | �� � t j � � S )zSSN Pattern.z�^
(?P<date>(0[1-9]|[1-2]\d|3[01])
(0[1-9]|1[012])
(\d{{2}}))
[ABCDEFYXWVU+-]
(?P<serial>(\d{{3}}))
(?P<checksum>[{check_marks}])$)�check_marks)r r �format�VERBOSE)r s r
�_ssn_patternr s= � � �:� *� +1�&�'� +1� +
� +
� �
�� � r �valuec �B � | sdS t j t � � | � � sdS g d�}t t | dd� � � }t | d � � }t d� t
||� � D � � � � dz }d|z
|k p||cxk odk nc S ) a� Validate a Finnish Business ID.
Each company in Finland has a distinct business id. For more
information see [Finnish Trade Register][1]
[1]: http://en.wikipedia.org/wiki/Finnish_Trade_Register
Examples:
>>> fi_business_id('0112038-9') # Fast Monkeys Ltd
# Output: True
>>> fi_business_id('1234567-8') # Bogus ID
# Output: ValidationError(func=fi_business_id, ...)
Args:
value:
Business ID string to be validated.
Returns:
(Literal[True]): If `value` is a valid finnish business id.
(ValidationError): If `value` is an invalid finnish business id.
F)� � �
� � � � Nr r c 3 �&