List[T] validation is not strict enough
See original GitHub issuewith this kind of model :
class Foo(BaseModel):
items: List[int]
Foo(items='')
does not throw any error. Looking at the code, we do not check the list is a list, but we iterate over it and check the elements. Any empty iterable can be used for List[T]
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (12 by maintainers)
Top Results From Across the Web
List[T] validation is not strict enough · Issue #86 · pydantic ...
Looking at the code, we do not check the list is a list, but we iterate over it and check the elements. ......
Read more >C5: Validate All Inputs - OWASP Top 10 Proactive Controls 2018
Blacklisting or blacklist validation attempts to check that given data does not contain “known bad” content. For example, a web application may block...
Read more >HTML Strict validation is not recognizing my imported ...
I am just validating my webpage and working through the errors. the scenario I have is that I have the structure where I...
Read more >Web Form Validation: Best Practices and Tutorials
Please notice that it is often a good idea to not impose a strict input pattern on the users; it's better to actually...
Read more >More on data validation - Microsoft Support
You can use data validation to restrict the type of data or values that users enter into cells. This is an advanced topic...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For me there is a difference between typing.List and typing.Sequence
'123'
is a Sequence, not a List@samuelcolvin can we close this issue? Fix merged