Skip to content

Commit 001449d

Browse files
author
Steve Ayers
committed
Make more consistent
1 parent 0c02d86 commit 001449d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

protovalidate/internal/extra_func.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def is_ip_prefix(val: celtypes.Value, *args) -> celpy.Result:
145145

146146

147147
def is_email(string: celtypes.Value) -> celpy.Result:
148-
"""Validate whether string is a valid email address.
148+
"""Return true if the string is an email address, for example "foo@example.com".
149149
150150
Conforms to the definition for a valid email address from the HTML standard.
151151
Note that this standard willfully deviates from RFC 5322, which allows many
@@ -161,7 +161,7 @@ def is_email(string: celtypes.Value) -> celpy.Result:
161161

162162

163163
def is_uri(string: celtypes.Value) -> celpy.Result:
164-
"""Validate whether string is a valid URI.
164+
"""Return true if the string is a URI, for example "https://example.com/foo/bar?baz=quux#frag".
165165
166166
URI is defined in the internet standard RFC 3986.
167167
Zone Identifiers in IPv6 address literals are supported (RFC 6874).
@@ -175,7 +175,8 @@ def is_uri(string: celtypes.Value) -> celpy.Result:
175175

176176

177177
def is_uri_ref(string: celtypes.Value) -> celpy.Result:
178-
"""Validate whether string is a valid URI reference.
178+
"""Return true if the string is a URI Reference - a URI such as "https://example.com/foo/bar?baz=quux#frag" or
179+
a Relative Reference such as "./foo/bar?query".
179180
180181
URI, URI Reference, and Relative Reference are defined in the internet standard RFC 3986.
181182
Zone Identifiers in IPv6 address literals are supported (RFC 6874).

0 commit comments

Comments
 (0)