/
week4.html
26 lines (25 loc) · 1.38 KB
/
week4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Week 4</title>
</head>
<body>
<form method="" action="">
<input type="text" name="postcode" pattern="[a-zA-Z]{2}" placeholder="Xx" title="only alphabets are allowed, lowercase or uppercase" size="2">
<input type="text" name="postcode2" pattern="[0-9]{4}" placeholder="0000" title="only numbers are allowed" size="4"><br>
<input type="text" name="ic1" placeholder="ic1" pattern="[0-1]{2}[-]{1}[0-9]{6}"><br>
<input type="text" name="ic2" placeholder="ic2" pattern="[0-1]{2}[-][0-9]{6}"><br>
<input type="text" name="ic3" placeholder="ic3" pattern="[0-1]{2}-[0-9]{6}\((Y|R|G)\)"><br>
<input type="text" name="id" placeholder="student id" pattern="[2][1-9](FT|PT)(B|T|H|E|P)[0-9]{4}">
<input type="text" name="landline" placeholder="landline number" pattern="(2|4|3|5)[0-9]{6}">
<input type="text" name="username" placeholder="username1" pattern="[a-zA-Z0-9]{3,15}">
<input type="text" name="username" placeholder="username2" pattern="[a-zA-Z0-9]{3,}">
<input type="text" name="username" placeholder="username3" pattern="[a-zA-Z0-9]+">
<input type="text" name="" placeholder="any character" pattern=".{4}">
<input type="text" name="" placeholder="only numbers" pattern="\d{3,}">
<input type="submit" name="">
</form>
</body>
</html>