This repository was archived by the owner on Mar 7, 2024. It is now read-only.
Replies: 1 comment
-
|
It's a bit more complicated than that. Databases rarely support “rich” strings (like “emails”) and it's not their job to perform validation on them. Magically adding TypeScript types won't make the data “safe” nor perform any type of validation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A good practice is to don't use generic type for the infos like Email, phone number...
I recommand to create an
emailtype instead of thestring | nulltype to avoid DataBase corruptions and any others problemsBeta Was this translation helpful? Give feedback.
All reactions