summaryrefslogtreecommitdiff
path: root/doc/reference.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference.rst')
-rw-r--r--doc/reference.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/reference.rst b/doc/reference.rst
index 66a5f7d..5b8ca3e 100644
--- a/doc/reference.rst
+++ b/doc/reference.rst
@@ -43,6 +43,21 @@ Module-level functions
:rtype: ``bool``
+.. function:: validate(version)
+
+ Check whether a version string complies with the `SemVer`_ rules.
+
+ .. code-block:: pycon
+
+ >>> semantic_version.validate('1.1.1')
+ True
+ >>> semantic_version.validate('1.2.3a4')
+ False
+
+ :param str version: The version string to validate
+ :rtype: ``bool``
+
+
Representing a version (the Version class)
------------------------------------------