-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathadmission.js
More file actions
47 lines (41 loc) · 1.04 KB
/
admission.js
File metadata and controls
47 lines (41 loc) · 1.04 KB
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
function msg1(){
var x=document.getElementById("number").value;
if(x.length>10 || x.length<10){
alert("phone number contain only 10 digits !");
return false;
}
return true;
}
function msg2(){
//alert("bibhas");
var y=document.getElementById('pass1').value;
var z=document.getElementById('address').value;
var a=document.getElementById('pass2').value;
var re = /^(?=.*\d)(?=.*[!@#$%^&*])/;
if(y!=a){
alert('Re-entered Password should match with Password');
}
if(z.search(/[A-Z]/ && /[a-z]/ )<0){
alert('City should contain only character');
}
/*if(z.search(/[a-z]/)<0){
alert('City should contain only character');
}
*/
if(y.length<8){
alert('Password must contain 8 character');
}
if(y.search(/[A-Z]/)<0){
alert("Password must contain one Upper case character");
}
if(y.search(/[a-z]/)<0){
alert("Password must contain one lower case character");
}
if(y.search(/[0-9]/)<0){
alert("Password must contain one number");
}
if (y.search(re)){
alert('Password must contain one special character');
}
return true;
}