Subversion Repositories SmartDukaan

Rev

Rev 10742 | Rev 10778 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10742 Rev 10748
Line 143... Line 143...
143
	if(amount ==''){    
143
	if(amount ==''){    
144
		document.getElementById('error').style.display = "block";
144
		document.getElementById('error').style.display = "block";
145
		document.getElementById('error').innerHTML ='Please fill recharge amount!';
145
		document.getElementById('error').innerHTML ='Please fill recharge amount!';
146
		window.scrollTo(0,0); return false;
146
		window.scrollTo(0,0); return false;
147
	}
147
	}
148
    if(!amount.match(/^\d+/)){
148
    if(!/^\d+$/.test(amount)){
149
        document.getElementById('error').style.display = "block";
149
        document.getElementById('error').style.display = "block";
150
		document.getElementById('error').innerHTML ='Please Use numbers only!';
150
		document.getElementById('error').innerHTML ='Please Use numbers only!';
151
		window.scrollTo(0,0); return false;
151
		window.scrollTo(0,0); return false;
152
	}
152
	}
153
	if((parseInt(amount) < 10) || (parseInt(amount) > 1000)){
153
	if((parseInt(amount) < 10) || (parseInt(amount) > 1000)){
Line 173... Line 173...
173
    if(email.indexOf(' ') != -1){  
173
    if(email.indexOf(' ') != -1){  
174
        document.getElementById('error').style.display = "block";
174
        document.getElementById('error').style.display = "block";
175
        document.getElementById('error').innerHTML ='Please remove space from email field!';
175
        document.getElementById('error').innerHTML ='Please remove space from email field!';
176
        window.scrollTo(0,0); return false;
176
        window.scrollTo(0,0); return false;
177
    }
177
    }
-
 
178
    if(email != email.trim()){  
-
 
179
        document.getElementById('error').style.display = "block";
-
 
180
        document.getElementById('error').innerHTML ='Please remove space from email field!';
-
 
181
        window.scrollTo(0,0); return false;
-
 
182
    }
178
 
183
 
179
}
184
}
180
function dthValidation(){
185
function dthValidation(){
181
	debugger;
186
	debugger;
182
	var operator = document.getElementById('dth-operator');
187
	var operator = document.getElementById('dth-operator');
Line 195... Line 200...
195
	if(number ==''){    
200
	if(number ==''){    
196
		document.getElementById('error').style.display = "block";
201
		document.getElementById('error').style.display = "block";
197
		document.getElementById('error').innerHTML ='Please enter the DTH number!';
202
		document.getElementById('error').innerHTML ='Please enter the DTH number!';
198
		window.scrollTo(0,0); return false;
203
		window.scrollTo(0,0); return false;
199
	}
204
	}
200
 //    if(!number.match(/^\d+/)){
205
    if(!/^\d+$/.test(number)){
201
 //        document.getElementById('error').style.display = "block";
206
        document.getElementById('error').style.display = "block";
202
	// 	document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';
207
		document.getElementById('error').innerHTML ='Please Use numbers only for Mobile Number!';
203
	// 	window.scrollTo(0,0); return false;
208
		window.scrollTo(0,0); return false;
204
	// }
209
	}
205
	if(amount ==''){    
210
	if(amount ==''){    
206
		document.getElementById('error').style.display = "block";
211
		document.getElementById('error').style.display = "block";
207
		document.getElementById('error').innerHTML ='Please fill recharge amount!';
212
		document.getElementById('error').innerHTML ='Please fill recharge amount!';
208
		window.scrollTo(0,0); return false;
213
		window.scrollTo(0,0); return false;
209
	}
214
	}
210
    if(!amount.match(/^\d+/)){
215
    if(!/^\d+$/.test(amount)){
211
        document.getElementById('error').style.display = "block";
216
        document.getElementById('error').style.display = "block";
212
		document.getElementById('error').innerHTML ='Please Use numbers only!';
217
		document.getElementById('error').innerHTML ='Please Use numbers only!';
213
		window.scrollTo(0,0); return false;
218
		window.scrollTo(0,0); return false;
214
	}
219
	}
215
	if((parseInt(amount) < 200) || (parseInt(amount) > 2000)){
220
	if((parseInt(amount) < 200) || (parseInt(amount) > 2000)){