Repository navigation
Add integer validators - #1728
Conversation
phalt
left a comment
There was a problem hiding this comment.
This is wicked, a great guardrail to add :)
There was a problem hiding this comment.
we should add a explicit check if anything else is getting caught up too maybe a pass over data and bounds set for some might be too narrow
also i thought our build.py currently dosent trigger these validators? because only full_clean or is_valid checks run them https://docs.djangoproject.com/en/5.2/ref/forms/validation/
we tend to do bulk_create can u confirm? afaik we might be bypassing these validators
|
Hi @FallenDeity it true, most of the time the validator aren't triggered, so they do act as a guardrail. They are still useful to generate the openapi schema with correct ranges for integer. I'd still merge in this PR. I fixed your and @jemarq04 suggestions, thanks a lot for going through all the values! Would it be better to add a comment specifying that the validator are bypassed? PS: here the only time it actually failed because a value was out of range |
|
A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data. |
Change description
by Adding validators we have two benefits:
AI coding assistance disclosure
Contributor check list