aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-09-10 20:29:09 -0400
committerBobby <[email protected]>2022-09-10 20:29:09 -0400
commit5085e5d09086766e2b3a55f6d9e2f797015f25d0 (patch)
tree7bc5f0dff1384867cf4d58efcc872543119bf727 /docs
parent6361141215b89942105203f91d34a2794d89a295 (diff)
downloadedify-5085e5d09086766e2b3a55f6d9e2f797015f25d0.tar.xz
edify-5085e5d09086766e2b3a55f6d9e2f797015f25d0.zip
Added email_rfc_5322 pattern
Diffstat (limited to 'docs')
-rw-r--r--docs/built-in/index.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/built-in/index.rst b/docs/built-in/index.rst
index 8d51c58..ff4a684 100644
--- a/docs/built-in/index.rst
+++ b/docs/built-in/index.rst
@@ -25,6 +25,20 @@ Then, call the ``email`` function with a string argument.
email('[email protected]') # returns True
email('hello') # returns False
+email_rfc_5322()
+-----------------
+
+The ``email_rfc_5322`` function verifies that a string is a valid email address according to the `RFC 5322 <https://tools.ietf.org/html/rfc5322>`_ standard which allows for the most complete validation. Usually, you should not use it because it is an overkill. In most cases apps are not able to handle all emails that this regex allows. The function takes a ``string`` argument which is supposed to be a valid email address. The function returns ``True`` if the string is a valid email address, and ``False`` otherwise.
+
+You can use the ``email_rfc_5322`` function as follows:
+
+.. code-block:: python
+
+ from edify.library import email_rfc_5322
+
+ email_rfc_5322('[email protected]') # returns True
+ email_rfc_5322('hello') # returns False
+
phone()
-------