Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form validation for name #37

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions Flask/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,23 @@ <h1>Volunteer Now</h1>
</p>
</div>
<div class="volunteerright">
<form>
<input type="text" placeholder="First Name" class="inputhalf" />
<input type="text" placeholder="Last Name" class="inputhalf" />
<form name="formhome">
<input
type="text"
placeholder="First Name"
class="inputhalf"
name="firstname"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input
type="text"
placeholder="Last Name"
class="inputhalf"
name="lastname"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input type="text" placeholder="Mobile Number" class="inputhalf" />
<input type="number" placeholder="Age" class="inputhalf" />
<input type="text" placeholder="Address" class="inputfull" />
Expand Down Expand Up @@ -235,7 +249,13 @@ <h1>Donation</h1>
<div class="donationright">
<form>
<input type="text" placeholder="E-Mail" class="inputfull" />
<input type="text" placeholder="Name On Card" class="inputfull" />
<input
type="text"
placeholder="Name On Card"
class="inputfull"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input type="number" placeholder="Card Number" class="inputfull" />
<input
type="text"
Expand Down
32 changes: 28 additions & 4 deletions Flask/templates/mentees.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,20 @@ <h1>Mentees</h1>
</div>
<div class="menteesformbodyright">
<form>
<input type="text" placeholder="First Name" class="inputhalf" />
<input type="text" placeholder="Last Name" class="inputhalf" />
<input
type="text"
placeholder="First Name"
class="inputhalf"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input
type="text"
placeholder="Last Name"
class="inputhalf"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input
type="text"
placeholder="Mobile Number"
Expand Down Expand Up @@ -162,8 +174,20 @@ <h1>Mentors</h1>
</div>
<div class="menteesformbodyright">
<form>
<input type="text" placeholder="First Name" class="inputhalf" />
<input type="text" placeholder="Last Name" class="inputhalf" />
<input
type="text"
placeholder="First Name"
class="inputhalf"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input
type="text"
placeholder="Last Name"
class="inputhalf"
pattern="[A-Za-z]+"
title="Enter only alphabets"
/>
<input
type="text"
placeholder="Mobile Number"
Expand Down