10000 Make assertion match message (#1533) · ag-python/pydantic@ba2cc5c · GitHub
[go: up one dir, main page]

Skip to content

Commit ba2cc5c

Browse files
Make assertion match message (pydantic#1533)
1 parent ec1dca9 commit ba2cc5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/examples/validators_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def passwords_match(cls, v, values, **kwargs):
2121

2222
@validator('username')
2323
def username_alphanumeric(cls, v):
24-
assert v.isalpha(), 'must be alphanumeric'
24+
assert v.isalnum(), 'must be alphanumeric'
2525
return v
2626

2727

0 commit comments

Comments
 (0)
0