File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/validators/__pycache__/uuid.cpython-310.pyc
Back
o �h( � @ sN d Z ddlZddlmZ ddlmZ ddlmZ edeeef fdd ��ZdS ) zUUID.� N)�Union)�UUID� )� validator�valuec C sB | sdS t | t�rdS zt| �pt�d| �W S ty Y dS w )af Return whether or not given value is a valid UUID-v4 string. This validator is based on [WTForms UUID validator][1]. [1]: https://github.com/wtforms/wtforms/blob/master/src/wtforms/validators.py#L539 Examples: >>> uuid('2bc1c94f-0deb-43e9-92a1-4775189ec9f8') # Output: True >>> uuid('2bc1c94f 0deb-43e9-92a1-4775189ec9f8') # Output: ValidationError(func=uuid, ...) Args: value: UUID string or object to validate. Returns: (Literal[True]): If `value` is a valid UUID. (ValidationError): If `value` is an invalid UUID. FTz4^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$)� isinstancer �re�match� ValueError)r � r �B/usr/local/CyberCP/lib/python3.10/site-packages/validators/uuid.py�uuid s ��r ) �__doc__r �typingr r r �utilsr �strr r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings