Subversion Repositories SmartDukaan

Rev

Rev 21826 | Rev 21830 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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