You are on page 1of 4

DA-4

CSE1007
Fall Sem 19-20
NAME SHAMBEL GONFA
REG NO: 18BCE2429
Write a HTML program to design an application form for a competitive exam.
Read all the necessary inputs required. Write a JSP code to validate all the
inputs received. The validated inputs should be displayed in the next page.

Ex: first name and last name should not contain numbers and special
characters
Address should not contain special characters.
Username and password – password should not be blank,
length should be 8 to 15. And should contain 1
uppercase, 1 lowercase and 1 number and 1
special character.
Age-18 to 28
Education – regular
Add more inputs and validate each input.

CODE

<!DOCTYPE html PUBLIC ">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>Personal Details</title>

</head>

<body>
<h1>Details of Form</h1>

<form action="Shambel" method="post">

<table style="with: 50%">

<tr>

<td>First Name</td>

<td><input type="text" name="first_name" /></td>

</tr>

<tr>

<td>Last Name</td>

<td><input type="text" name="last_name" /></td>

</tr>

<tr>

<td>UserName</td>

<td><input type="text" name="username" /></td>

</tr>

<tr>

<td>Password</td>

<td><input #password="ngModel" type="password"


name="password" minlength="5" maxlength="8" pattern="((?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,20})"
required ngModel>

<br /></td>

</tr>

<tr>

<td>Address</td>

<td><input type="text" name="address" /></td>

</tr>

<tr>

<td>Contact No</td>

<td><input type="text" name="contact" /></td>

</tr>

<tr>

<td>Education</td>
<td><input type="text" name="education" /></td>

</tr></table>

<input type="submit" value="Submit" /></form>

</body>

</html>ml>

OUTPUT

You might also like