add pesel to form
This commit is contained in:
parent
04f446e013
commit
52ba3313fb
@ -11,6 +11,7 @@ export interface Student {
|
|||||||
first_name: string
|
first_name: string
|
||||||
last_name: string
|
last_name: string
|
||||||
index: number
|
index: number
|
||||||
|
pesel: string
|
||||||
mode: boolean
|
mode: boolean
|
||||||
group?: any
|
group?: any
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,23 @@ const AddStudent = () => {
|
|||||||
<InputError>Indeks musi mieć 6 cyfr</InputError>
|
<InputError>Indeks musi mieć 6 cyfr</InputError>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<div className="form-control">
|
||||||
|
<label className="label" htmlFor="pesel">
|
||||||
|
Pesel
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
className="input input-bordered"
|
||||||
|
id="pesel"
|
||||||
|
type="text"
|
||||||
|
{...register('pesel', {
|
||||||
|
required: false,
|
||||||
|
pattern: /^[0-9]{11}$/,
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
{errors.pesel?.type === 'pattern' && (
|
||||||
|
<InputError>Pesel musi mieć 11 cyfr</InputError>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div className="form-control gap-2">
|
<div className="form-control gap-2">
|
||||||
<label className="label">Tryb studiów</label>
|
<label className="label">Tryb studiów</label>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
|
Loading…
Reference in New Issue
Block a user