File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Airtable is heavily relied upon. You need the following tables (change the IDs i
5050 * ` email ` - primary, email
5151 * ` first_name ` - single line text
5252 * ` last_name ` - single line text
53+ * ` phone ` - phone number
5354 * ` owned_event ` - link to another record in the Events table
5455 * ` attending_events ` - link to another record in the Events table, multiple can be linked
5556 * ` projects ` - link to another record in the Projects table, multiple can be linked
Original file line number Diff line number Diff line change 11import datetime
22from typing import Annotated , Optional
33from pydantic import BaseModel , EmailStr , StringConstraints
4-
54from podium import constants
65
76from podium .db import tables
@@ -12,6 +11,9 @@ class UserBase(BaseModel):
1211 first_name : str
1312 last_name : str
1413 email : EmailStr
14+ # International phone number format
15+ phone : Annotated [str , StringConstraints (pattern = r"^\+[1-9]\d{1,14}$" )]
16+ # phone: Annotated[str, StringConstraints(pattern=r"^\+?[1-9]\d{1,14}$")]
1517 street_1 : str
1618 street_2 : Optional [str ] = ""
1719 city : str
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ export type User_Output = {
140140 first_name : string ;
141141 last_name : string ;
142142 email : string ;
143+ phone : string ;
143144 street_1 : string ;
144145 street_2 ?: ( string | null ) ;
145146 city : string ;
@@ -171,6 +172,7 @@ export type UserSignupPayload = {
171172 first_name : string ;
172173 last_name : string ;
173174 email : string ;
175+ phone : string ;
174176 street_1 : string ;
175177 street_2 ?: ( string | null ) ;
176178 city : string ;
Original file line number Diff line number Diff line change 2020 email: " " ,
2121 first_name: " " ,
2222 last_name: " " ,
23+ phone: " " ,
2324 street_1: " " ,
2425 street_2: " " ,
2526 city: " " ,
111112 email: " " ,
112113 first_name: " " ,
113114 last_name: " " ,
115+ phone: " " ,
114116 street_1: " " ,
115117 street_2: " " ,
116118 city: " " ,
253255 bind:value ={userInfo .last_name }
254256 />
255257 </label >
256-
258+ <label class =" form-control" >
259+ <div class =" label" >
260+ <span class =" label-text" >Phone</span >
261+ <span class =" label-text-alt text-warning" >
262+ International format without spaces or special characters
263+ </span >
264+ </div >
265+ <input
266+ id =" phone"
267+ type =" tel"
268+ class =" input input-bordered grow"
269+ placeholder =" +15555555555"
270+ bind:value ={userInfo .phone }
271+ />
272+ </label >
257273 <label class =" form-control" >
258274 <div class =" label" >
259275 <span class =" label-text" >Address line 1</span >
You can’t perform that action at this time.
0 commit comments