Update validator function name in examples to show that value must b… (#3327)

* Update validator function name in  examples to show that value must be bar vs must contain a space

* Add md file in
This commit is contained in:
Michael Rios
2021-12-08 15:17:08 -08:00
committed by GitHub
parent d1a014542a
commit 043d16bcf8
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ class Model(BaseModel):
foo: str
@validator('foo')
def name_must_contain_space(cls, v):
def value_must_equal_bar(cls, v):
if v != 'bar':
raise ValueError('value must be "bar"')