Subversion Repositories SmartDukaan

Rev

Rev 21823 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
21818 kshitij.so 1
function associateValidator(){
2
    $('#form').bootstrapValidator({
3
        fields: {
4
            RegisteredBusinessName: {
5
                validators: {
6
 
7
                        notEmpty: {
8
                        message: 'Please fill the BusinessName'
9
                    }
10
                }
11
            },
12
 
13
 
14
         RegisteredAddress1: {
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
 
59
                Mobile: {
60
                validators: {
61
                    stringLength: {
62
                       max: 10,
63
                    },
64
                    notEmpty: {
65
                        message: 'Please fill your Mobile'
66
                    },
67
 
68
                    }
69
                },
70
               Email1: {
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
 
81
            Email2:{
82
               validators: {
83
 
84
                    emailAddress: {
85
                        message: 'Please fill valid email address'
86
                    }
87
                }
88
            },
89
 
90
            DINNumber:{
91
              validators:{
92
                 notEmpty: {
93
                        message: 'Please fill the DINumber'
94
                    }
95
                }
96
            },
97
 
98
            bEntitydoc:{
99
 
100
               validators: {
101
                          file: {
102
          //extension: 'pdf,zip,rtf,jpg,png',
103
         //type: 'application/pdf,application/zip,application/jpg,application.png'
104
 
105
    },
106
    notEmpty: {
107
                    message: 'Document is required.'
108
              }
109
    }
110
  },
111
 
112
 
113
    angledoc1:{
114
 
115
               validators: {
116
                          file: {
117
         // extension: 'pdf,zip,rtf,jpg,png',
118
         // type: 'application/pdf,application/zip,application/jpg,application.png'
119
 
120
    },
121
    notEmpty: {
122
                    message: 'Document is required.'
123
              }
124
    }
125
  },
126
 
127
  angledoc2:{
128
 
129
               validators: {
130
                          file: {
131
         // extension: 'pdf,zip,rtf,jpg,png',
132
         // type: 'application/pdf,application/zip,application/jpg,application.png'
133
 
134
    },
135
    notEmpty: {
136
                    message: 'Document is required.'
137
              }
138
    }
139
  },
140
angledoc3:{
141
 
142
               validators: {
143
                          file: {
144
         // extension: 'pdf,zip,rtf,jpg,png',
145
          //type: 'application/pdf,application/zip,application/jpg,application.png'
146
 
147
    },
148
    notEmpty: {
149
                    message: 'Document is required.'
150
              }
151
    }
152
  },
153
angledoc4:{
154
 
155
               validators: {
156
                          file: {
157
          //extension: 'pdf,zip,rtf,jpg,png',
158
         // type: 'application/pdf,application/zip,application/jpg,application.png'
159
 
160
    },
161
    notEmpty: {
162
                    message: 'Document is required.'
163
              }
164
    }
165
  },
166
 
167
angledoc5:{
168
  validators: {
169
                          file: {
170
          //extension: 'pdf,zip,rtf,jpg,png',
171
          //type: 'application/pdf,application/zip,application/jpg,application.png'
172
 
173
    },
174
    notEmpty: {
175
                    message: 'Document is required.'
176
              }
177
    }
178
  },
179
 
180
            pan:{
181
              validators:{
182
 
183
                      stringLength: {
184
                       max: 10,
185
                    },
186
                notEmpty:{
187
                  message:'Please fill the valid pan Number'
188
                }
189
 
190
              }
191
            },
192
 
193
            Pandoc:{
194
 
195
               validators: {
196
                          file: {
197
          //extension: 'pdf,zip,rtf,jpg,png',
198
          //type: 'application/pdf,application/zip,application/jpg,application.png'
199
 
200
    },
201
    notEmpty: {
202
                    message: 'Pan card Document is required.'
203
              }
204
    }
205
  },
206
            ProprietorbusineesName:{
207
                 validators:{
208
 
209
                notEmpty:{
210
                  message:'Please fill the field'
211
                }
212
 
213
              }
214
            },
215
            ProprietorAddress:{
216
validators:{
217
                notEmpty:{
218
                  message:'Please fill the field'
219
                }
220
 
221
              }
222
            }, 
223
 
224
            Proprietorphone:{
225
                validators:{
226
 
227
                 stringLength: {
228
                       max: 10,
229
                    },
230
                   notEmpty:{
231
                  message:'Please fill the field'
232
                }
233
 
234
              } 
235
          },   
236
        Proprietorpan:{
237
validators:{
238
 
239
             stringLength: {
240
                       max: 10,
241
                    },
242
                  notEmpty:{
243
                  message:'Please fill the field'
244
                }
245
 
246
              } 
247
        },
248
        Proprietoradhaar:{
249
             validators:{
250
 
251
            notEmpty:{
252
                  message:'Please fill the field'
253
                }
254
 
255
              }  
256
          },
257
 
258
          Proprietoremail:{
259
             validators: {
260
                    notEmpty: {
261
                        message: 'Please fill the field'
262
                    },
263
                    emailAddress: {
264
                        message: 'Please fill a valid email address'
265
                    }
266
                }
267
            },
268
 
269
            Proprietorowner:{
270
           validators:{
271
              stringLength: {
272
                       max: 10,
273
                    },
274
            notEmpty:{
275
                  message:'Please fill the field'
276
                }
277
 
278
              } 
279
            },
280
 
281
           partnerName1:{
282
                 validators:{
283
 
284
                notEmpty:{
285
                  message:'Please fill the field'
286
                }
287
 
288
              }
289
            },
290
            partnerAddress1:{
291
 validators:{
292
                notEmpty:{
293
                  message:'Please fill the field'
294
                }
295
 
296
              }
297
            }, 
298
 
299
            partnerphone1:{
300
                 validators:{
301
                 stringLength: {
302
                       max: 10,
303
                    },
304
                   notEmpty:{
305
                  message:'Please fill the field'
306
                }
307
 
308
              } 
309
          },   
310
       partnerpan1:{
311
 validators:{
312
             stringLength: {
313
                       max: 10,
314
                    },
315
                  notEmpty:{
316
                  message:'Please fill the field'
317
                }
318
 
319
              } 
320
        },
321
        partneradhaar1:{
322
             validators:{
323
 
324
            notEmpty:{
325
                  message:'Please fill the field'
326
                }
327
 
328
              }  
329
          },
330
 
331
         partneremail1:{
332
             validators: {
333
                    notEmpty: {
334
                        message: 'Please fill the field'
335
                    },
336
                    emailAddress: {
337
                        message: 'Please fill a valid email address'
338
                    }
339
                }
340
            },
341
 
342
           partnerowner1:{
343
           validators:{
344
              stringLength: {
345
                       max: 10,
346
                    },
347
            notEmpty:{
348
                  message:'Please fill the field'
349
                }
350
 
351
              } 
352
            },
353
 
354
 
355
 
356
       shareholderName1:{
357
                 validators:{
358
 
359
                notEmpty:{
360
                  message:'Please fill the field'
361
                }
362
 
363
              }
364
            },
365
            shareholderAddress1:{
366
 validators:{
367
                notEmpty:{
368
                  message:'Please fill the field'
369
                }
370
 
371
              }
372
            }, 
373
 
374
            shareholderphone1:{
375
                 validators:{
376
                 stringLength: {
377
                       max: 10,
378
                    },
379
                   notEmpty:{
380
                  message:'Please fill the field'
381
                }
382
 
383
              } 
384
          },   
385
     shareholderpan1:{
386
 validators:{
387
             stringLength: {
388
                       max: 10,
389
                    },
390
                  notEmpty:{
391
                  message:'Please fill the field'
392
                }
393
 
394
              } 
395
        },
396
        shareholderadhaar1:{
397
             validators:{
398
 
399
            notEmpty:{
400
                  message:'Please fill the field'
401
                }
402
 
403
              }  
404
          },
405
 
406
        shareholderemail1:{
407
             validators: {
408
                    notEmpty: {
409
                        message: 'Please fill the field'
410
                    },
411
                    emailAddress: {
412
                        message: 'Please fill a valid email address'
413
                    }
414
                }
415
            },
416
 
417
         shareholderowner1:{
418
           validators:{
419
              stringLength: {
420
                       max: 10,
421
                    },
422
            notEmpty:{
423
                  message:'Please fill the field'
424
                }
425
 
426
              } 
427
            },
428
             Managername: {
429
                validators: {
430
 
431
                        notEmpty: {
432
                        message: 'Please fill the ManagerName'
433
                    }
434
                }
435
            },
436
 
437
             ManagerNo:{
438
                 validators:{
439
                 stringLength: {
440
                       max: 10,
441
                    },
442
                   notEmpty:{
443
                  message:'Please fill the ManagerNo'
444
                }
445
 
446
              } 
447
          },
448
 
449
          Manageremail:{
450
            validators: {
451
                    notEmpty: {
452
                        message: 'Please fill the Manageremail'
453
                    },
454
                    emailAddress: {
455
                        message: 'Please fill a valid email address'
456
                    }
457
                }
458
            },
459
        noofemployees:{
460
                validators:{
461
                   notEmpty:{
462
                  message:'Please fill the Number of employees'
463
                }
464
            }},
465
Managementstaff:{
466
               validators:{
467
                   notEmpty:{
468
                  message:'Please fill the  Number of Managementstaff'
469
                }
470
            }
471
        },
472
 
473
        ITRdoc:{
474
 
475
               validators: {
476
                          file: {
477
          extension: 'pdf,zip,rtf,jpg,png',
478
          type: 'application/pdf,application/zip,application/jpg,application.png'
479
 
480
    },
481
    notEmpty: {
482
                    message: 'ITR Document is required.'
483
              }
484
    }
485
  },
486
 
487
  ownershipdoc:{
488
     validators: {
489
                          file: {
490
          //extension: 'pdf,zip,rtf,jpg,png',
491
          //type: 'application/pdf,application/zip,application/jpg,application.png'
492
 
493
    },
494
    notEmpty: {
495
                    message: 'Ownership Document is required.'
496
              }
497
    }
498
},
499
 
500
insurancedoc:{
501
     validators: {
502
                          file: {
503
        //  extension: 'pdf,zip,rtf,jpg,png',
504
         // type: 'application/pdf,application/zip,application/jpg,application.png'
505
 
506
    },
507
    notEmpty: {
508
                    message: 'Insurance Document is required.'
509
              }
510
    }
511
},
512
loandoc:{
513
     validators: {
514
                          file: {
515
         // extension: 'pdf,zip,rtf,jpg,png',
516
          //type: 'application/pdf,application/zip,application/jpg,application.png'
517
 
518
    },
519
    notEmpty: {
520
                    message: 'Document is required.'
521
              }
522
    }
523
},
524
sanctiondoc:{
525
     validators: {
526
                          file: {
527
         // extension: 'pdf,zip,rtf,jpg,png',
528
         // type: 'application/pdf,application/zip,application/jpg,application.png'
529
 
530
    },
531
    notEmpty: {
532
                    message: 'Document is required.'
533
              }
534
    }
535
},
536
 
537
chequecopy:{
538
     validators: {
539
                          file: {
540
         // extension: 'pdf,zip,rtf,jpg,png',
541
         // type: 'application/pdf,application/zip,application/jpg,application.png'
542
 
543
    },
544
    notEmpty: {
545
                    message: 'Document is required.'
546
              }
547
    }
548
},
549
 
550
        portalName1:{
551
             validators:{
552
                   notEmpty:{
553
                  message:'Please fill the PortalName'
554
                }
555
            }
556
        },
557
       east:{
558
         validators:{
559
                   notEmpty:{
560
                  message:'Please fill the Area'
561
                }
562
            }
563
        },
564
        west:{
565
         validators:{
566
                   notEmpty:{
567
                  message:'Please fill the Area'
568
                }
569
            }
570
        },
571
        North:{
572
         validators:{
573
                   notEmpty:{
574
                  message:'Please fill the Area'
575
                }
576
            }
577
        },
578
 
579
     south:{
580
         validators:{
581
                   notEmpty:{
582
                  message:'Please fill the Area'
583
                }
584
            }
585
        },
586
 
587
        Front:{
588
         validators:{
589
                   notEmpty:{
590
                  message:'Please fill the Area'
591
                }
592
            }
593
        },
594
 
595
        roadsize:{
596
         validators:{
597
                   notEmpty:{
598
                  message:'Please fill the Area'
599
                }
600
            }
601
        },
602
        storename:{
603
            validators:{
604
                   notEmpty:{
605
                  message:'Please fill the storename'
606
                }
607
            }
608
        },
609
 
610
        storeAddress:{
611
            validators:{
612
                   notEmpty:{
613
                  message:'Please fill the storeAddress'
614
                }
615
            }
616
        }, 
617
 
618
        accountnumber:{
619
            validators:{
620
                   notEmpty:{
621
                  message:'Please fill the accountnumber'
622
                }
623
            }
624
        },  
625
        bankname:{
626
            validators:{
627
                   notEmpty:{
628
                  message:'Please fill the bankname'
629
                }
630
            }
631
        },  
632
        IFSCcode:{
633
            validators:{
634
                   notEmpty:{
635
                  message:'Please fill the IFSCcode'
636
                }
637
            }
638
        }, 
639
        Branchname:{
640
            validators:{
641
                   notEmpty:{
642
                  message:'Please fill the Branchname'
643
                }
644
            }
645
        },
646
 
647
        utr:{
648
           validators:{
649
                   notEmpty:{
650
                  message:'Please fill the field'
651
                }
652
            }
653
        }
654
 
655
 
656
 
657
 
658
 
659
            }
660
        }).on('success.form.bv', function(e) {
661
            $('#success_message').slideDown({ opacity: "show" }, "slow") // Do something ...
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
}
681
     var isChecked = jQuery("input[name=bPmpdetail]:checked").val();
682
      if(!isChecked){
683
         alert('Please select the detail of BusinessEntity');
684
          return false;
685
     }else{
686
 
687
     }
688
 
689
       var isChecked = jQuery("input[name=businessmodel]:checked").val();
690
      if(!isChecked){
691
         alert('Please select the BusinessModel');
692
          return false;
693
     }else{
694
         }
695
 
696
        var isChecked = jQuery("input[name=sellingonline]:checked").val();
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
 
710
   var isChecked = jQuery("input[name=shopstatus]:checked").val();
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
 
733
         var isChecked = jQuery("input[name=neareststore]:checked").val();
734
      if(!isChecked){
735
          alert('Please select the NearestStore');
736
           return false;
737
     }else{
738
         }
739
 
740
            var isChecked = jQuery("input[name=Insurance]:checked").val();
741
      if(!isChecked){
742
          alert('Please select the Insurance field');
743
           return false;
744
     }else{
745
         }
746
 
747
     var isChecked = jQuery("input[name=loan]:checked").val();
748
      if(!isChecked){
749
          alert('Please select the loan field');
750
           return false;
751
     }else{
752
         }
753
 var isChecked = jQuery("input[type=checkbox]:checked").val();
754
      if(!isChecked){
755
          alert('Please select the Status of shop');
756
           return false;
757
     }
758
});
759
}