Make assertion match message
@@ -21,7 +21,7 @@ class UserModel(BaseModel):
@validator('username')
def username_alphanumeric(cls, v):
- assert v.isalpha(), 'must be alphanumeric'
+ assert v.isalnum(), 'must be alphanumeric'
return v
