2
2
Button ,
3
3
LoadingOverlay ,
4
4
Modal ,
5
+ NumberInput ,
5
6
Select ,
6
7
Textarea ,
7
8
TextInput ,
@@ -40,6 +41,8 @@ export default function Form() {
40
41
roll : "" ,
41
42
phone : "" ,
42
43
branch : "" ,
44
+ year : "" ,
45
+ section : "" ,
43
46
} ,
44
47
validationRules : {
45
48
email : ( value ) => validator . isEmail ( value ) ,
@@ -48,6 +51,8 @@ export default function Form() {
48
51
value . length >= 3 ,
49
52
roll : ( value ) => checkStudentRollNumber ( value ) ,
50
53
phone : ( value ) => validator . isMobilePhone ( value , [ "en-IN" ] ) ,
54
+ year :( value ) => validator . isNumeric ( value ) ,
55
+
51
56
} ,
52
57
errorMessages : {
53
58
email : "Enter a valid email address" ,
@@ -174,6 +179,40 @@ export default function Form() {
174
179
placeholder = "970414xxxx"
175
180
{ ...form . getInputProps ( "phone" ) }
176
181
/>
182
+ < div className = "flex gap-4" >
183
+ < Select
184
+ icon = { < span className = "material-icons" >
185
+ date_range
186
+ </ span > }
187
+ placeholder = "Enter your year"
188
+ label = "Year"
189
+ required
190
+ data = { [
191
+ { value : "1" , label : "1" } ,
192
+ { value : "2" , label : "2" } ,
193
+ { value : "3" , label : "3" } ,
194
+ { value : "4" , label : "4" } ,
195
+
196
+ ] }
197
+ { ...form . getInputProps ( "year" ) }
198
+
199
+ />
200
+ < Select
201
+ icon = { < span className = "material-icons" > class</ span > }
202
+ required
203
+ label = "Section"
204
+ variant = "filled"
205
+ data = { [
206
+ { value : "A" , label : "A" } ,
207
+ { value : "B" , label : "B" } ,
208
+ { value : "C" , label : "C" } ,
209
+ { value : "D" , label : "D" } ,
210
+
211
+ ] }
212
+ placeholder = "Enter your section"
213
+ { ...form . getInputProps ( "section" ) }
214
+ />
215
+ </ div >
177
216
< Select
178
217
icon = { < span className = "material-icons" > school</ span > }
179
218
label = "Branch"
0 commit comments