Skip to content

Commit eb70fcc

Browse files
committed
Add section and year
1 parent 14970fe commit eb70fcc

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

src/Components/Form.jsx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
Button,
33
LoadingOverlay,
44
Modal,
5+
NumberInput,
56
Select,
67
Textarea,
78
TextInput,
@@ -40,6 +41,8 @@ export default function Form() {
4041
roll: "",
4142
phone: "",
4243
branch: "",
44+
year: "",
45+
section: "",
4346
},
4447
validationRules: {
4548
email: (value) => validator.isEmail(value),
@@ -48,6 +51,8 @@ export default function Form() {
4851
value.length >= 3,
4952
roll: (value) => checkStudentRollNumber(value),
5053
phone: (value) => validator.isMobilePhone(value, ["en-IN"]),
54+
year:(value)=> validator.isNumeric(value),
55+
5156
},
5257
errorMessages: {
5358
email: "Enter a valid email address",
@@ -174,6 +179,40 @@ export default function Form() {
174179
placeholder="970414xxxx"
175180
{...form.getInputProps("phone")}
176181
/>
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>
177216
<Select
178217
icon={<span className="material-icons">school</span>}
179218
label="Branch"

0 commit comments

Comments
 (0)