mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
11 lines
209 B
Python
11 lines
209 B
Python
# output-json
|
|
from index_main import User
|
|
|
|
# ignore-above
|
|
from pydantic import ValidationError
|
|
|
|
try:
|
|
User(signup_ts='broken', friends=[1, 2, 'not number'])
|
|
except ValidationError as e:
|
|
print(e.json())
|