Subversion Repositories SmartDukaan

Rev

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

Rev 22155 Rev 22618
Line 1... Line 1...
1
function associateValidator(){
1
function associateValidator() {
2
    validator = $('#form').bootstrapValidator({
2
	validator = $('#form').bootstrapValidator({
3
        fields: {
3
		fields : {
4
          registeredBusinessName: {
4
			registeredBusinessName : {
5
                validators: {
5
				validators : {
6
                    
6
 
7
                        notEmpty: {
7
					notEmpty : {
8
                        message: 'Please fill the BusinessName'
8
						message : 'Please fill the BusinessName'
9
                    }
9
					}
10
                }
10
				}
11
            },
11
			},
12
 
12
 
13
    
13
			line1 : {
14
            line1: {
14
				validators : {
15
                validators: {
15
 
16
                   
16
					notEmpty : {
17
                    notEmpty: {
17
						message : 'Please fill the Address field.'
18
                        message: 'Please fill the Address field.'
18
					}
19
                    }
19
				}
20
                }
20
			},
21
            },
21
			city : {
22
            city: {
22
				validators : {
23
                validators: {
23
 
24
                  
24
					notEmpty : {
25
                    notEmpty: {
25
						message : 'Please fill the city '
26
                        message: 'Please fill the city '
26
					}
27
                    }
27
				}
28
                }
28
			},
29
            },
29
 
30
 
30
			pincode : {
31
             pincode: {
31
				validators : {
32
                validators: {
32
					notEmpty : {
33
                    notEmpty: {
33
						message : 'Please fill your pincode'
34
                        message: 'Please fill your pincode'
34
					},
35
                    },
35
 
36
                   
36
				}
37
                }
37
			},
38
            },
38
 
39
 
39
			state : {
40
           state: {
40
				validators : {
41
                validators: {
41
					notEmpty : {
42
                    notEmpty: {
42
						message : 'Please select your state'
43
                        message: 'Please select your state'
43
					}
44
                    }
44
				}
45
                }
45
			},
46
            },
46
 
47
       
47
			district : {
48
       district:{
48
				validators : {
49
        validators: {
49
					notEmpty : {
50
                    notEmpty: {
50
						message : 'Please select your district.'
51
                        message: 'Please select your district.'
51
					}
52
                    }
52
				}
53
                }
53
			},
54
            },
54
 
55
 
55
			mobile : {
56
       
56
				validators : {
57
 
57
					stringLength : {
58
                mobile: {
58
						max : 10,
59
                validators: {
59
					},
60
                    stringLength: {
60
					notEmpty : {
61
                       max: 10,
61
						message : 'Please fill your Mobile'
62
                    },
62
					},
63
                    notEmpty: {
63
 
64
                        message: 'Please fill your Mobile'
64
				}
65
                    },
65
			},
66
             
66
 
67
                    }
67
			stdcode : {
68
                },
68
				validators : {
69
 
69
 
70
                stdcode: {
70
					notEmpty : {
71
                validators: {
71
						message : 'Pleasefill your phone number'
72
                   
72
					},
73
                    notEmpty: {
73
 
74
                        message: 'Pleasefill your phone number'
74
				}
75
                    },
75
			},
76
                   
76
 
77
                    }
77
			telephone : {
78
                },
78
				validators : {
79
 
79
 
80
 
80
					notEmpty : {
81
                telephone: {
81
						message : 'Pleasefill your phone number'
82
                validators: {
82
					},
83
                   
83
 
84
                    notEmpty: {
84
				}
85
                        message: 'Pleasefill your phone number'
85
			},
86
                    },
86
			registeredEmail1 : {
87
                   
87
				validators : {
88
                    }
88
					notEmpty : {
89
                },
89
						message : 'Please fill your email address'
90
                registeredEmail1: {
90
					},
91
                validators: {
91
					emailAddress : {
92
                    notEmpty: {
92
						message : 'Please fill a valid email address'
93
                        message: 'Please fill your email address'
93
					}
94
                    },
94
				}
95
                    emailAddress: {
95
			},
96
                        message: 'Please fill a valid email address'
96
 
97
                    }
97
			registeredEmail2 : {
98
                }
98
				validators : {
99
            },
99
 
100
 
100
					emailAddress : {
101
            registeredEmail2:{
101
						message : 'Please fill valid email address'
102
               validators: {
102
					}
103
                  
103
				}
104
                    emailAddress: {
104
			},
105
                        message: 'Please fill valid email address'
105
 
106
                    }
106
			dinNumber : {
107
                }
107
				validators : {
108
            },
108
					notEmpty : {
109
 
109
						message : 'Please fill the DINumber'
110
            dinNumber:{
110
					}
111
              validators:{
111
				}
112
                 notEmpty: {
112
			},
113
                        message: 'Please fill the DINumber'
113
 
114
                    }
114
			bEntityDoc : {
115
                }
115
				excluded : false,
116
            },
116
				validators : {
117
          
117
 
118
 
118
					notEmpty : {
119
                bEntityDoc:{
119
						message : 'Document is required.'
120
                	   excluded: false,   
120
					}
121
                   validators: {
121
				}
122
                            
122
			},
123
        notEmpty: {
123
			
124
                        message: 'Document is required.'
124
			gstDoc : {
125
                  }
125
				excluded : false,
126
        }
126
				validators : {
127
      },
127
 
128
    
128
					notEmpty : {
129
    
129
						message : 'Document is required.'
130
      angleDoc1:{
130
					}
131
    	   excluded: false,   
131
				}
132
                   validators: {
132
			},			
133
                      
133
 
134
        notEmpty: {
134
			angleDoc1 : {
135
                        message: 'Document is required.'
135
				excluded : false,
136
                  }
136
				validators : {
137
        }
137
 
138
      },
138
					notEmpty : {
139
    
139
						message : 'Document is required.'
140
      angleDoc2:{
140
					}
141
    	   excluded: false,   
141
				}
142
                   validators: {
142
			},
143
                          
143
 
144
        notEmpty: {
144
			angleDoc2 : {
145
                        message: 'Document is required.'
145
				excluded : false,
146
                  }
146
				validators : {
147
        }
147
 
148
      },
148
					notEmpty : {
149
      angleDoc3:{
149
						message : 'Document is required.'
150
    	   excluded: false,   
150
					}
151
                     validators: {
151
				}
152
                          
152
			},
153
          notEmpty: {
153
			angleDoc3 : {
154
                    message: 'Document is required.'
154
				excluded : false,
155
              }
155
				validators : {
156
            }
156
 
157
          },
157
					notEmpty : {
158
        angleDoc4:{
158
						message : 'Document is required.'
159
        	   excluded: false,   
159
					}
160
               validators: {
160
				}
161
                   
161
			},
162
          notEmpty: {
162
			angleDoc4 : {
163
                          message: 'Document is required.'
163
				excluded : false,
164
                    }
164
				validators : {
165
          }
165
 
166
        },
166
					notEmpty : {
167
                  
167
						message : 'Document is required.'
168
      angleDoc5:{
168
					}
169
    	   excluded: false,   
169
				}
170
        validators: {
170
			},
171
                              
171
 
172
                      notEmpty: {
172
			angleDoc5 : {
173
                    message: 'Document is required.'
173
				excluded : false,
174
              }
174
				validators : {
175
               }
175
 
176
              },
176
					notEmpty : {
177
 
177
						message : 'Document is required.'
178
            pan:{
178
					}
179
              validators:{
179
				}
180
 
180
			},
181
                      stringLength: {
181
 
182
                       max: 10,
182
			pan : {
183
                    },
183
				validators : {
184
                notEmpty:{
184
 
185
                  message:'Please fill the valid pan Number'
185
					stringLength : {
186
                }
186
						max : 10,
187
 
187
					},
188
              }
188
					notEmpty : {
189
            },
189
						message : 'Please fill the valid pan Number'
190
 
190
					}
191
            panDoc:{
191
 
192
            	   excluded: false,   
192
				}
193
               validators: {
193
			},
194
                         
194
 
195
    notEmpty: {
195
			panDoc : {
196
                    message: 'Pan card Document is required.'
196
				excluded : false,
197
              }
197
				validators : {
198
    }
198
 
199
  },
199
					notEmpty : {
200
  proprietorBusineesName:{
200
						message : 'Pan card Document is required.'
201
                 validators:{
201
					}
202
 
202
				}
203
                notEmpty:{
203
			},
204
                  message:'Please fill the field'
204
			proprietorBusineesName : {
205
                }
205
				validators : {
206
 
206
 
207
              }
207
					notEmpty : {
208
            },
208
						message : 'Please fill the field'
209
            proprietorAddress:{
209
					}
210
             validators:{
210
 
211
                notEmpty:{
211
				}
212
                  message:'Please fill the field'
212
			},
213
                }
213
			proprietorAddress : {
214
 
214
				validators : {
215
              }
215
					notEmpty : {
216
            }, 
216
						message : 'Please fill the field'
217
 
217
					}
218
            proprietorPhone:{
218
 
219
                validators:{
219
				}
220
 
220
			},
221
                 stringLength: {
221
 
222
                       max: 10,
222
			proprietorPhone : {
223
                    },
223
				validators : {
224
                   notEmpty:{
224
 
225
                  message:'Please fill the field'
225
					stringLength : {
226
                }
226
						max : 10,
227
 
227
					},
228
              } 
228
					notEmpty : {
229
          },   
229
						message : 'Please fill the field'
230
          proprietorPan:{
230
					}
231
              validators:{
231
 
232
 
232
				}
233
             stringLength: {
233
			},
234
                       max: 10,
234
			proprietorPan : {
235
                    },
235
				validators : {
236
                  notEmpty:{
236
 
237
                  message:'Please fill the field'
237
					stringLength : {
238
                }
238
						max : 10,
239
 
239
					},
240
              } 
240
					notEmpty : {
241
        },
241
						message : 'Please fill the field'
242
        proprietorAdhaar:{
242
					}
243
             validators:{
243
 
244
 
244
				}
245
            notEmpty:{
245
			},
246
                  message:'Please fill the field'
246
			proprietorAdhaar : {
247
                }
247
				validators : {
248
 
248
 
249
              }  
249
					notEmpty : {
250
          },
250
						message : 'Please fill the field'
251
 
251
					}
252
          proprietorEmail:{
252
 
253
             validators: {
253
				}
254
                    notEmpty: {
254
			},
255
                        message: 'Please fill the field'
255
 
256
                    },
256
			proprietorEmail : {
257
                    emailAddress: {
257
				validators : {
258
                        message: 'Please fill a valid email address'
258
					notEmpty : {
259
                    }
259
						message : 'Please fill the field'
260
                }
260
					},
261
            },
261
					emailAddress : {
262
 
262
						message : 'Please fill a valid email address'
263
            proprietorOwner:{
263
					}
264
           validators:{
264
				}
265
              stringLength: {
265
			},
266
                       max: 10,
266
 
267
                    },
267
			proprietorOwner : {
268
            notEmpty:{
268
				validators : {
269
                  message:'Please fill the field'
269
					stringLength : {
270
                }
270
						max : 10,
271
 
271
					},
272
              } 
272
					notEmpty : {
273
            },
273
						message : 'Please fill the field'
274
 
274
					}
275
            partnerName1:{
275
 
276
                 validators:{
276
				}
277
 
277
			},
278
                notEmpty:{
278
 
279
                  message:'Please fill the field'
279
			partnerName1 : {
280
                }
280
				validators : {
281
 
281
 
282
              }
282
					notEmpty : {
283
            },
283
						message : 'Please fill the field'
284
            partnerAddress1:{
284
					}
285
            validators:{
285
 
286
                notEmpty:{
286
				}
287
                  message:'Please fill the field'
287
			},
288
                }
288
			partnerAddress1 : {
289
 
289
				validators : {
290
              }
290
					notEmpty : {
291
            }, 
291
						message : 'Please fill the field'
292
 
292
					}
293
            partnerPhone1:{
293
 
294
                 validators:{
294
				}
295
                 stringLength: {
295
			},
296
                       max: 10,
296
 
297
                    },
297
			partnerPhone1 : {
298
                   notEmpty:{
298
				validators : {
299
                  message:'Please fill the field'
299
					stringLength : {
300
                }
300
						max : 10,
301
 
301
					},
302
              } 
302
					notEmpty : {
303
          },   
303
						message : 'Please fill the field'
304
          partnerPan1:{
304
					}
305
            validators:{
305
 
306
             stringLength: {
306
				}
307
                       max: 10,
307
			},
308
                    },
308
			partnerPan1 : {
309
                  notEmpty:{
309
				validators : {
310
                  message:'Please fill the field'
310
					stringLength : {
311
                }
311
						max : 10,
312
 
312
					},
313
              } 
313
					notEmpty : {
314
        },
314
						message : 'Please fill the field'
315
        partnerAdhaar1:{
315
					}
316
             validators:{
316
 
317
 
317
				}
318
            notEmpty:{
318
			},
319
                  message:'Please fill the field'
319
			partnerAdhaar1 : {
320
                }
320
				validators : {
321
 
321
 
322
              }  
322
					notEmpty : {
323
          },
323
						message : 'Please fill the field'
324
 
324
					}
325
          partnerEmail1:{
325
 
326
             validators: {
326
				}
327
                    notEmpty: {
327
			},
328
                        message: 'Please fill the field'
328
 
329
                    },
329
			partnerEmail1 : {
330
                    emailAddress: {
330
				validators : {
331
                        message: 'Please fill a valid email address'
331
					notEmpty : {
332
                    }
332
						message : 'Please fill the field'
333
                }
333
					},
334
            },
334
					emailAddress : {
335
 
335
						message : 'Please fill a valid email address'
336
            partnerOwner1:{
336
					}
337
           validators:{
337
				}
338
              stringLength: {
338
			},
339
                       max: 10,
339
 
340
                    },
340
			partnerOwner1 : {
341
            notEmpty:{
341
				validators : {
342
                  message:'Please fill the field'
342
					stringLength : {
343
                }
343
						max : 10,
344
 
344
					},
345
              } 
345
					notEmpty : {
346
            },
346
						message : 'Please fill the field'
347
        
347
					}
348
 
348
 
349
 
349
				}
350
            shareholderName1:{
350
			},
351
                 validators:{
351
 
352
 
352
			shareholderName1 : {
353
                notEmpty:{
353
				validators : {
354
                  message:'Please fill the field'
354
 
355
                }
355
					notEmpty : {
356
 
356
						message : 'Please fill the field'
357
              }
357
					}
358
            },
358
 
359
            shareholderAddress1:{
359
				}
360
            validators:{
360
			},
361
                notEmpty:{
361
			shareholderAddress1 : {
362
                  message:'Please fill the field'
362
				validators : {
363
                }
363
					notEmpty : {
364
 
364
						message : 'Please fill the field'
365
              }
365
					}
366
            }, 
366
 
367
 
367
				}
368
            shareholderPhone1:{
368
			},
369
                 validators:{
369
 
370
                 stringLength: {
370
			shareholderPhone1 : {
371
                       max: 10,
371
				validators : {
372
                    },
372
					stringLength : {
373
                   notEmpty:{
373
						max : 10,
374
                  message:'Please fill the field'
374
					},
375
                }
375
					notEmpty : {
376
 
376
						message : 'Please fill the field'
377
              } 
377
					}
378
          },   
378
 
379
     shareholderPan1:{
379
				}
380
             validators:{
380
			},
381
             stringLength: {
381
			shareholderPan1 : {
382
                       max: 10,
382
				validators : {
383
                    },
383
					stringLength : {
384
                  notEmpty:{
384
						max : 10,
385
                  message:'Please fill the field'
385
					},
386
                }
386
					notEmpty : {
387
 
387
						message : 'Please fill the field'
388
              } 
388
					}
389
        },
389
 
390
        shareholderAdhaar1:{
390
				}
391
             validators:{
391
			},
392
 
392
			shareholderAdhaar1 : {
393
            notEmpty:{
393
				validators : {
394
                  message:'Please fill the field'
394
 
395
                }
395
					notEmpty : {
396
 
396
						message : 'Please fill the field'
397
              }  
397
					}
398
          },
398
 
399
 
399
				}
400
          shareholderEmail1:{
400
			},
401
             validators: {
401
 
402
                    notEmpty: {
402
			shareholderEmail1 : {
403
                        message: 'Please fill the field'
403
				validators : {
404
                    },
404
					notEmpty : {
405
                    emailAddress: {
405
						message : 'Please fill the field'
406
                        message: 'Please fill a valid email address'
406
					},
407
                    }
407
					emailAddress : {
408
                }
408
						message : 'Please fill a valid email address'
409
            },
409
					}
410
 
410
				}
411
            shareholderOwner1:{
411
			},
412
           validators:{
412
 
413
              stringLength: {
413
			shareholderOwner1 : {
414
                       max: 10,
414
				validators : {
415
                    },
415
					stringLength : {
416
            notEmpty:{
416
						max : 10,
417
                  message:'Please fill the field'
417
					},
418
                }
418
					notEmpty : {
419
 
419
						message : 'Please fill the field'
420
              } 
420
					}
421
            },
421
 
422
            managerName: {
422
				}
423
                validators: {
423
			},
424
                    
424
			managerName : {
425
                        notEmpty: {
425
				validators : {
426
                        message: 'Please fill the ManagerName'
426
 
427
                    }
427
					notEmpty : {
428
                }
428
						message : 'Please fill the ManagerName'
429
            },
429
					}
430
            
430
				}
431
            managerNo:{
431
			},
432
                 validators:{
432
 
433
                 stringLength: {
433
			managerNo : {
434
                       max: 10,
434
				validators : {
435
                    },
435
					stringLength : {
436
                   notEmpty:{
436
						max : 10,
437
                  message:'Please fill the ManagerNo'
437
					},
438
                }
438
					notEmpty : {
439
 
439
						message : 'Please fill the ManagerNo'
440
              } 
440
					}
441
          },
441
 
442
 
442
				}
443
          managerEmail:{
443
			},
444
            validators: {
444
 
445
                    notEmpty: {
445
			managerEmail : {
446
                        message: 'Please fill the Manageremail'
446
				validators : {
447
                    },
447
					notEmpty : {
448
                    emailAddress: {
448
						message : 'Please fill the Manageremail'
449
                        message: 'Please fill a valid email address'
449
					},
450
                    }
450
					emailAddress : {
451
                }
451
						message : 'Please fill a valid email address'
452
            },
452
					}
453
            noOfEmployees:{
453
				}
454
                validators:{
454
			},
455
                   notEmpty:{
455
			noOfEmployees : {
456
                  message:'Please fill the Number of employees'
456
				validators : {
457
                }
457
					notEmpty : {
458
            }},
458
						message : 'Please fill the Number of employees'
459
            managementStaff:{
459
					}
460
               validators:{
460
				}
461
                   notEmpty:{
461
			},
462
                  message:'Please fill the  Number of Managementstaff'
462
			managementStaff : {
463
                }
463
				validators : {
464
            }
464
					notEmpty : {
465
        },
465
						message : 'Please fill the  Number of Managementstaff'
466
 
466
					}
467
        itrDoc:{
467
				}
468
        	   excluded: false,   
468
			},
469
               validators: {
469
 
470
                      
470
			itrDoc : {
471
        notEmpty: {
471
				excluded : false,
472
                        message: 'ITR Document is required.'
472
				validators : {
473
                  }
473
 
474
        }
474
					notEmpty : {
475
      },
475
						message : 'ITR Document is required.'
476
 
476
					}
477
        ownershipDoc:{
477
				}
478
        	
478
			},
479
        	   excluded: false,   
479
 
480
           validators: {
480
			ownershipDoc : {
481
                   
481
 
482
          notEmpty: {
482
				excluded : false,
483
                          message: 'Ownership Document is required.'
483
				validators : {
484
                    }
484
 
485
          }
485
					notEmpty : {
486
      },
486
						message : 'Ownership Document is required.'
487
      
487
					}
488
      insuranceDoc:{
488
				}
489
    	   excluded: optionalDocsHandler,   
489
			},
490
    	  validators: {
490
 
491
              
491
			insuranceDoc : {
492
          notEmpty: {
492
				excluded : optionalDocsHandler,
493
                          message: 'Insurance Document is required.'
493
				validators : {
494
                    }
494
 
495
          }
495
					notEmpty : {
496
      },
496
						message : 'Insurance Document is required.'
497
      loanDoc:{
497
					}
498
    	   excluded: optionalDocsHandler,   
498
				}
499
   
499
			},
500
           validators: {
500
			loanDoc : {
501
               
501
				excluded : optionalDocsHandler,
502
           notEmpty: {
502
 
503
                          message: 'Document is required.'
503
				validators : {
504
            }
504
 
505
           }
505
					notEmpty : {
506
      },
506
						message : 'Document is required.'
507
      sanctionDoc:{
507
					}
508
    	   excluded: optionalDocsHandler,   
508
				}
509
      
509
			},
510
           validators: {
510
			sanctionDoc : {
511
             
511
				excluded : optionalDocsHandler,
512
          notEmpty: {
512
 
513
                          message: 'Document is required.'
513
				validators : {
514
                    }
514
 
515
          }
515
					notEmpty : {
516
      },
516
						message : 'Document is required.'
517
      
517
					}
518
      chequeCopy:{
518
				}
519
    	   excluded: false,   
519
			},
520
      
520
 
521
           validators: {
521
			chequeCopy : {
522
                 
522
				excluded : false,
523
          notEmpty: {
523
 
524
                          message: 'Document is required.'
524
				validators : {
525
                    }
525
 
526
          }
526
					notEmpty : {
527
      },
527
						message : 'Document is required.'
528
 
528
					}
529
        portalName1:{
529
				}
530
             validators:{
530
			},
531
                   notEmpty:{
531
 
532
                  message:'Please fill the PortalName'
532
			portalName1 : {
533
                }
533
				validators : {
534
            }
534
					notEmpty : {
535
        },
535
						message : 'Please fill the PortalName'
536
       east:{
536
					}
537
         validators:{
537
				}
538
                   notEmpty:{
538
			},
539
                  message:'Please fill the Area'
539
			east : {
540
                }
540
				validators : {
541
            }
541
					notEmpty : {
542
        },
542
						message : 'Please fill the Area'
543
        west:{
543
					}
544
         validators:{
544
				}
545
                   notEmpty:{
545
			},
546
                  message:'Please fill the Area'
546
			west : {
547
                }
547
				validators : {
548
            }
548
					notEmpty : {
549
        },
549
						message : 'Please fill the Area'
550
        north:{
550
					}
551
         validators:{
551
				}
552
                   notEmpty:{
552
			},
553
                  message:'Please fill the Area'
553
			north : {
554
                }
554
				validators : {
555
            }
555
					notEmpty : {
556
        },
556
						message : 'Please fill the Area'
557
 
557
					}
558
     south:{
558
				}
559
         validators:{
559
			},
560
                   notEmpty:{
560
 
561
                  message:'Please fill the Area'
561
			south : {
562
                }
562
				validators : {
563
            }
563
					notEmpty : {
564
        },
564
						message : 'Please fill the Area'
565
 
565
					}
566
        front:{
566
				}
567
         validators:{
567
			},
568
                   notEmpty:{
568
 
569
                  message:'Please fill the Area'
569
			front : {
570
                }
570
				validators : {
571
            }
571
					notEmpty : {
572
        },
572
						message : 'Please fill the Area'
573
 
573
					}
574
        roadSize:{
574
				}
575
         validators:{
575
			},
576
                   notEmpty:{
576
 
577
                  message:'Please fill the Area'
577
			roadSize : {
578
                }
578
				validators : {
579
            }
579
					notEmpty : {
580
        },
580
						message : 'Please fill the Area'
581
        storeName:{
581
					}
582
            validators:{
582
				}
583
                   notEmpty:{
583
			},
584
                  message:'Please fill the storename'
584
			storeName : {
585
                }
585
				validators : {
586
            }
586
					notEmpty : {
587
        },
587
						message : 'Please fill the storename'
588
 
588
					}
589
        storeAddress:{
589
				}
590
            validators:{
590
			},
591
                   notEmpty:{
591
 
592
                  message:'Please fill the storeAddress'
592
			storeAddress : {
593
                }
593
				validators : {
594
            }
594
					notEmpty : {
595
        }, 
595
						message : 'Please fill the storeAddress'
596
 
596
					}
597
        accountNumber:{
597
				}
598
            validators:{
598
			},
599
                   notEmpty:{
599
 
600
                  message:'Please fill the accountnumber'
600
			accountNumber : {
601
                }
601
				validators : {
602
            }
602
					notEmpty : {
603
        },  
603
						message : 'Please fill the accountnumber'
604
        bankName:{
604
					}
605
            validators:{
605
				}
606
                   notEmpty:{
606
			},
607
                  message:'Please fill the bankname'
607
			bankName : {
608
                }
608
				validators : {
609
            }
609
					notEmpty : {
610
        },  
610
						message : 'Please fill the bankname'
611
        ifscCode:{
611
					}
612
            validators:{
612
				}
613
                   notEmpty:{
613
			},
614
                  message:'Please fill the IFSCcode'
614
			ifscCode : {
615
                }
615
				validators : {
616
            }
616
					notEmpty : {
617
        }, 
617
						message : 'Please fill the IFSCcode'
618
        branchName:{
618
					}
619
            validators:{
619
				}
620
                   notEmpty:{
620
			},
621
                  message:'Please fill the Branchname'
621
			branchName : {
622
                }
622
				validators : {
623
            }
623
					notEmpty : {
624
        },
624
						message : 'Please fill the Branchname'
625
 
625
					}
626
        utr:{
626
				}
627
           validators:{
627
			},
628
                   notEmpty:{
628
 
629
                  message:'Please fill the field'
629
			utr : {
630
                }
630
				validators : {
631
            }
631
					notEmpty : {
632
        } 
632
						message : 'Please fill the field'
633
        
633
					}
634
            }
634
				}
635
        }).on('success.form.bv', function(e) {
635
			}
636
                $('#form').data('bootstrapValidator').resetForm();
636
 
637
 
637
		}
638
            // Prevent form submission
638
	}).on('success.form.bv', function(e) {
639
            e.preventDefault();
639
		$('#form').data('bootstrapValidator').resetForm();
640
 
640
 
641
            // Get the form instance
641
		// Prevent form submission
642
            var $form = $(e.target);
642
		e.preventDefault();
643
 
643
 
644
            // Get the BootstrapValidator instance
644
		// Get the form instance
645
            var bv = $form.data('bootstrapValidator');
645
		var $form = $(e.target);
646
 
646
 
647
            // Use Ajax to submit form data
647
		// Get the BootstrapValidator instance
648
 var isChecked = jQuery("input[name=bEntity]:checked").val();
648
		var bv = $form.data('bootstrapValidator');
649
      if(!isChecked){
649
 
650
         alert('Please select the type of BusinessEntity');
650
		// Use Ajax to submit form data
651
         return false;
651
		var isChecked = jQuery("input[name=bEntity]:checked").val();
652
     }else{
652
		if (!isChecked) {
653
         
653
			alert('Please select the type of BusinessEntity');
-
 
654
			return false;
-
 
655
		} else {
-
 
656
 
-
 
657
		}
-
 
658
		var isChecked = jQuery("input[name=bPmpDetail]:checked").val();
-
 
659
		if (!isChecked) {
-
 
660
			alert('Please select the detail of BusinessEntity');
-
 
661
			return false;
-
 
662
		} else {
-
 
663
 
-
 
664
		}
-
 
665
 
-
 
666
		var isChecked = jQuery("input[name=businessModel]:checked").val();
-
 
667
		if (!isChecked) {
-
 
668
			alert('Please select the BusinessModel');
-
 
669
			return false;
-
 
670
		} else {
-
 
671
		}
-
 
672
 
-
 
673
		var isChecked = jQuery("input[name=sellingOnline]:checked").val();
-
 
674
		if (!isChecked) {
-
 
675
			alert('Please select the Sellingonline');
-
 
676
			return false;
-
 
677
		} else {
-
 
678
		}
-
 
679
 
-
 
680
		var isChecked = jQuery("input[name=shopArea]:checked").val();
-
 
681
		if (!isChecked) {
-
 
682
			alert('Please select the Shop Area');
-
 
683
			return false;
-
 
684
		} else {
-
 
685
		}
-
 
686
 
-
 
687
		var isChecked = jQuery("input[name=shopStatus]:checked").val();
-
 
688
		if (!isChecked) {
-
 
689
			alert('Please select the shopstatus');
-
 
690
			return false;
-
 
691
		} else {
-
 
692
		}
-
 
693
 
-
 
694
		var isChecked = jQuery("input[name=shopAvailbility]:checked").val();
-
 
695
		if (!isChecked) {
-
 
696
			alert('Please select the Shop Availbility');
-
 
697
			return false;
-
 
698
		} else {
-
 
699
		}
-
 
700
 
-
 
701
		var isChecked = jQuery("input[name=location]:checked").val();
-
 
702
		if (!isChecked) {
-
 
703
			alert('Please select the Loacation of Shop');
-
 
704
			return false;
-
 
705
		} else {
-
 
706
		}
-
 
707
 
-
 
708
		var isChecked = jQuery("input[name=nearestStore]:checked").val();
-
 
709
		if (!isChecked) {
-
 
710
			alert('Please select the NearestStore');
-
 
711
			return false;
-
 
712
		} else {
-
 
713
		}
-
 
714
 
-
 
715
		var isChecked = jQuery("input[name=ownership]:checked").val();
-
 
716
		if (!isChecked) {
-
 
717
			alert('Please select the ownership of Shop');
-
 
718
			return false;
-
 
719
		} else {
-
 
720
		}
-
 
721
 
-
 
722
		var isChecked = jQuery("input[name=insurance]:checked").val();
-
 
723
		if (!isChecked) {
-
 
724
			alert('Please select the Insurance field');
-
 
725
			return false;
-
 
726
		} else {
-
 
727
		}
-
 
728
 
-
 
729
		var isChecked = jQuery("input[name=loan]:checked").val();
-
 
730
		if (!isChecked) {
-
 
731
			alert('Please select the loan field');
-
 
732
			return false;
-
 
733
		} else {
-
 
734
		}
-
 
735
		var isChecked = jQuery("input[type=checkbox]:checked").val();
-
 
736
		if (!isChecked) {
-
 
737
			alert('Please select the Status of shop');
-
 
738
			return false;
-
 
739
		}
-
 
740
		submitFormAsJson($(this));
-
 
741
	}).on('error.form.bv', function(e) {
-
 
742
		console.log("here");
-
 
743
	});
654
}
744
}
655
     var isChecked = jQuery("input[name=bPmpDetail]:checked").val();
-
 
656
      if(!isChecked){
-
 
657
         alert('Please select the detail of BusinessEntity');
-
 
658
          return false;
-
 
659
     }else{
-
 
660
         
-
 
661
     }
-
 
662
 
745
 
663
       var isChecked = jQuery("input[name=businessModel]:checked").val();
-
 
664
      if(!isChecked){
-
 
665
         alert('Please select the BusinessModel');
-
 
666
          return false;
-
 
667
     }else{
-
 
668
         }
-
 
669
 
-
 
670
        var isChecked = jQuery("input[name=sellingOnline]:checked").val();
-
 
671
      if(!isChecked){
-
 
672
          alert('Please select the Sellingonline');
-
 
673
           return false;
-
 
674
     }else{
-
 
675
         }
-
 
676
 
-
 
677
    var isChecked = jQuery("input[name=shopArea]:checked").val();
-
 
678
      if(!isChecked){
-
 
679
          alert('Please select the Shop Area');
746
function submitFormAsJson(jQueryForm) {
680
           return false;
-
 
681
     }else{
-
 
682
         }
-
 
683
 
-
 
684
   var isChecked = jQuery("input[name=shopStatus]:checked").val();
-
 
685
      if(!isChecked){
-
 
686
          alert('Please select the shopstatus');
-
 
687
           return false;
-
 
688
     }else{
-
 
689
         }
-
 
690
         
-
 
691
 
-
 
692
            var isChecked = jQuery("input[name=shopAvailbility]:checked").val();
-
 
693
      if(!isChecked){
-
 
694
          alert('Please select the Shop Availbility');
-
 
695
           return false;
-
 
696
     }else{
-
 
697
         }
-
 
698
 
-
 
699
              var isChecked = jQuery("input[name=location]:checked").val();
-
 
700
      if(!isChecked){
747
	jQuery.blockUI({
701
          alert('Please select the Loacation of Shop');
748
		message : "<h5>Please wait while we upload data to our server</h5>"
702
           return false;
-
 
703
     }else{
-
 
704
         }
-
 
705
 
-
 
706
 
-
 
707
         var isChecked = jQuery("input[name=nearestStore]:checked").val();
-
 
708
      if(!isChecked){
-
 
709
          alert('Please select the NearestStore');
-
 
710
           return false;
-
 
711
     }else{
-
 
712
         }
-
 
713
 
-
 
714
      var isChecked = jQuery("input[name=ownership]:checked").val();
-
 
715
if(!isChecked){
-
 
716
  alert('Please select the ownership of Shop');
-
 
717
   return false;
-
 
718
}else{
-
 
719
 }
749
	});
720
 
-
 
721
            var isChecked = jQuery("input[name=insurance]:checked").val();
-
 
722
      if(!isChecked){
-
 
723
          alert('Please select the Insurance field');
-
 
724
           return false;
-
 
725
     }else{
-
 
726
         }
-
 
727
 
-
 
728
     var isChecked = jQuery("input[name=loan]:checked").val();
-
 
729
      if(!isChecked){
-
 
730
          alert('Please select the loan field');
-
 
731
           return false;
-
 
732
     }else{
-
 
733
         }
-
 
734
 var isChecked = jQuery("input[type=checkbox]:checked").val();
-
 
735
      if(!isChecked){
-
 
736
          alert('Please select the Status of shop');
-
 
737
           return false;
-
 
738
     }
-
 
739
      submitFormAsJson($(this));
-
 
740
      }).on('error.form.bv', function(e) {
-
 
741
    	  console.log("here");
-
 
742
      });
-
 
743
    }
-
 
744
 
-
 
745
 
-
 
746
 
-
 
747
function submitFormAsJson(jQueryForm){
-
 
748
    jQuery.blockUI({ message: "<h5>Please wait while we upload data to our server</h5>" });
-
 
749
    data = objectifyForm($("form").serializeArray());
750
	data = objectifyForm($("form").serializeArray());
750
    for (var name in data){
751
	for ( var name in data) {
751
    	if(docsArray.indexOf(name)>=0){
752
		if (docsArray.indexOf(name) >= 0) {
752
    		data[name]=+data[name];
753
			data[name] = +data[name];
753
    	}
754
		}
754
    } 
755
	}
755
    jQuery.ajax({
756
	jQuery.ajax({
756
        url: contextPath +"/register",
757
		url : contextPath + "/register",
757
        type: 'POST',
758
		type : 'POST',
758
        contentType:'application/json',
759
		contentType : 'application/json',
759
        data: JSON.stringify(),
760
		data : JSON.stringify(),
760
        success: function (data) {
761
		success : function(data) {
761
            //$('#form')[0].reset();
762
			// $('#form')[0].reset();
762
        	jQuery.unblockUI();
763
			jQuery.unblockUI();
763
        	jQuery("html").html(data);
764
			jQuery("html").html(data);
764
        },
765
		},
765
     error : function() {
766
		error : function() {
766
       jQuery.unblockUI();
767
			jQuery.unblockUI();
767
  	   alert("OOPS!!!Failed to do changes.Try Again.");
768
			alert("OOPS!!!Failed to do changes.Try Again.");
768
     },
769
		},
769
        cache: false,
770
		cache : false,
770
        processData: false
771
		processData : false
771
    });
772
	});
772
}
773
}
773
//serialize data function
774
// serialize data function
774
function objectifyForm(formArray) {
775
function objectifyForm(formArray) {
775
 
776
 
776
	  var returnArray = {};
777
	var returnArray = {};
777
	  for (var i = 0; i < formArray.length; i++){
778
	for (var i = 0; i < formArray.length; i++) {
778
		  var name = formArray[i]['name'];
779
		var name = formArray[i]['name'];
779
		  var value = formArray[i]['value'];
780
		var value = formArray[i]['value'];
780
	    returnArray[name] = value;
781
		returnArray[name] = value;
781
	  }
782
	}
782
	  return returnArray;
783
	return returnArray;
783
}
784
}
784
 
785
 
785
function optionalDocsHandler($field, validator) {
786
function optionalDocsHandler($field, validator) {
786
	return $("input[name=doc_" + $field.attr(name) + "]").is(":visible"); 
787
	return $("input[name=doc_" + $field.attr(name) + "]").is(":visible");
787
}
788
}
788
789