Title: SQLModel doesn't raise ValidationError · Issue #52 · fastapi/sqlmodel · GitHub
Open Graph Title: SQLModel doesn't raise ValidationError · Issue #52 · fastapi/sqlmodel
X Title: SQLModel doesn't raise ValidationError · Issue #52 · fastapi/sqlmodel
Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I already searched in Google "How to X in...
Open Graph Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I...
X Description: First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated searc...
Opengraph URL: https://github.com/fastapi/sqlmodel/issues/52
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SQLModel doesn't raise ValidationError","articleBody":"### First Check\n\n- [X] I added a very descriptive title to this issue.\n- [X] I used the GitHub search to find a similar issue and didn't find it.\n- [X] I searched the SQLModel documentation, with the integrated search.\n- [X] I already searched in Google \"How to X in SQLModel\" and didn't find any information.\n- [X] I already read and followed all the tutorial in the docs and didn't find an answer.\n- [X] I already checked if it is not related to SQLModel but to [Pydantic](https://github.com/samuelcolvin/pydantic).\n- [X] I already checked if it is not related to SQLModel but to [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy).\n\n### Commit to Help\n\n- [X] I commit to help with one of those options 👆\n\n### Example Code\n\n```python\nfrom typing import Optional\r\n\r\nfrom pydantic import BaseModel\r\nfrom sqlmodel import Field, SQLModel\r\n\r\nclass User1(SQLModel, table=True):\r\n id: Optional[int] = Field(primary_key=True)\r\n name: str\r\n\r\nclass User2(BaseModel):\r\n name: str\r\n\r\nUser1()\r\nUser2()\n```\n\n\n### Description\n\n* Create SQLModel\r\n* Create equivalent pydantic model\r\n* Create instance of SQLModel without providing required arguments\r\n* Create instance of pydantic model without providing required arguments \r\n\r\nThe pydantic model raises an ValidationError whereas the SQLModel doesn't raise a ValidationError even though an required argument is not provided. I would expect a ValidationError if not all required arguments is provided.\n\n### Operating System\n\nmacOS\n\n### Operating System Details\n\n_No response_\n\n### SQLModel Version\n\n0.0.4\n\n### Python Version\n\nPython 3.8.5\n\n### Additional Context\n\n_No response_","author":{"url":"https://github.com/elben10","@type":"Person","name":"elben10"},"datePublished":"2021-08-28T12:22:40Z","url":"https://github.com/fastapi/sqlmodel/issues/52"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8c4370e5-00a0-2f55-c556-a1aad9e8c4ef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A962:2C6DBB:78EE67:A6D85E:6AFDF1CD |
| html-safe-nonce | 979587f7ba942bcfbec27c0583661dd5d3c8a5d83836fa5a5fea72ac39132eb4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTYyOjJDNkRCQjo3OEVFNjc6QTZEODVFOjZBRkRGMUNEIiwidmlzaXRvcl9pZCI6IjQ4ODM2NjM2NDc0MjA1NzYyMDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ebb28c29cd556dcafcde27c2ed6615be540bedcaf97b38b882a5994b01261898 |
| hovercard-subject-tag | issue:981822256 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/fastapi/sqlmodel/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d95d6e3ce437a59ec93ca8813de2a7f90fa017dc59f880551d913e8200f2b7a/fastapi/sqlmodel/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d95d6e3ce437a59ec93ca8813de2a7f90fa017dc59f880551d913e8200f2b7a/fastapi/sqlmodel/issues/52 |
| og:image:alt | First Check I added a very descriptive title to this issue. I used the GitHub search to find a similar issue and didn't find it. I searched the SQLModel documentation, with the integrated search. I... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | elben10 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dd812ec581ecac95855f5ec917ef9827506c39a9da1443f43ddb4179a46471eb |
| turbo-cache-control | no-preview |
| go-import | github.com/fastapi/sqlmodel git https://github.com/fastapi/sqlmodel.git |
| octolytics-dimension-user_id | 156354296 |
| octolytics-dimension-user_login | fastapi |
| octolytics-dimension-repository_id | 399495186 |
| octolytics-dimension-repository_nwo | fastapi/sqlmodel |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 399495186 |
| octolytics-dimension-repository_network_root_nwo | fastapi/sqlmodel |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 32ac708bac264dafdc28e10ff49b4d137f0c34a7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width