-
Notifications
You must be signed in to change notification settings - Fork 0
/
form.js
50 lines (42 loc) · 1.29 KB
/
form.js
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
function MyFunc() {
var Fname = /[a-z]||[A-Z]{1-20}/;
if (Fname = document.getElementById("Fname").value.search(Fname) === -1) {
alert("Invalid Expression");
} else {
alert("Valid Expression");
}
}
function MyFunc1() {
var Lname = /[a-z]||[A-Z]{1-20}/;
if (Lname = document.getElementById('Lname').value.search(Lname) === -1)
{
alert("Invalid Expression")
} else {
alert("Valid Expression");
}
}
function Myfunc2() {
var email = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
if (email = document.getElementById('email').value.search(email) === -1)
{
alert("Invalid Expression");
} else {
alert("valid Expression");
}
}
function Myfunc1() {
var phone = /[\-+]?|[0-9]+/;
if (phone = document.getElementById('phone').value.search(phone) === -1) {
alert("Invalid Expression");
} else {
alert("Valid Expression");
}
}
function MyFunc3() {
var password = /^[a-zA-Z0-9!@#$%^&*]{6,16}$/;
if (password = Document.getElementById('Password').value.search === -1) {
alert("Invalid Expression");
} else {
alert("Valid Expression");
}
}