Skip to content

Commit fb0cfad

Browse files
authored
Fix isEmail ignoring trailing newlines (#285)
1 parent aef7b62 commit fb0cfad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protovalidate/internal/extra_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def cel_is_email(string: celtypes.Value) -> celpy.Result:
137137
if not isinstance(string, celtypes.StringType):
138138
msg = "invalid argument, expected string"
139139
raise celpy.CELEvalError(msg)
140-
m = _email_regex.match(string) is not None
140+
m = _email_regex.fullmatch(string) is not None
141141
return celtypes.BoolType(m)
142142

143143

0 commit comments

Comments
 (0)