summaryrefslogtreecommitdiff
path: root/app/schemas
diff options
context:
space:
mode:
Diffstat (limited to 'app/schemas')
-rw-r--r--app/schemas/user.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/schemas/user.py b/app/schemas/user.py
index 9f67ff1..bee48aa 100644
--- a/app/schemas/user.py
+++ b/app/schemas/user.py
@@ -1,6 +1,6 @@
from typing import Optional
-from pydantic import BaseModel, EmailStr, Field
+from pydantic import BaseModel, EmailStr, Field, field_validator
from app.schemas.profile import ProfileRead
@@ -49,3 +49,12 @@ class ChangePassword(BaseModel):
current_password: str = Field(..., min_length=8)
new_password: str = Field(..., min_length=8)
repeat_password: str = Field(..., min_length=8)
+
+
+class SetPassword(BaseModel):
+ new_password: str = Field(..., min_length=8)
+ repeat_password: str = Field(..., min_length=8)
+
+ model_config = {
+ "extra": "forbid",
+ }