Subversion Repositories SmartDukaan

Rev

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