mirror of
https://github.com/aykhans/portfolio-blog.git
synced 2025-09-10 08:00:44 +00:00
Added send-email feature
This commit is contained in:
14
src/app/schemas/main.py
Normal file
14
src/app/schemas/main.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from fastapi import Form
|
||||
|
||||
from pydantic import EmailStr
|
||||
|
||||
|
||||
@dataclass
|
||||
class SendEmail:
|
||||
name: str = Form(..., max_length=50)
|
||||
email: EmailStr = Form(...)
|
||||
phone: Optional[str] = Form(None, max_length=20)
|
||||
message: str = Form(..., max_length=1000)
|
Reference in New Issue
Block a user