Subversion Repositories SmartDukaan

Rev

Rev 21818 | Rev 21824 | 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
 
21823 rajender 99
		            bEntitydoc:{
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
            $('#success_message').slideDown({ opacity: "show" }, "slow") // Do something ...
663
                $('#form').data('bootstrapValidator').resetForm();
664
 
665
            // Prevent form submission
666
            e.preventDefault();
667
 
668
            // Get the form instance
669
            var $form = $(e.target);
670
 
671
            // Get the BootstrapValidator instance
672
            var bv = $form.data('bootstrapValidator');
673
 
674
            // Use Ajax to submit form data
675
 var isChecked = jQuery("input[name=bEntity]:checked").val();
676
      if(!isChecked){
677
         alert('Please select the type of BusinessEntity');
678
         return false;
679
     }else{
680
 
681
}
21823 rajender 682
     var isChecked = jQuery("input[name=bPmpDetail]:checked").val();
21818 kshitij.so 683
      if(!isChecked){
684
         alert('Please select the detail of BusinessEntity');
685
          return false;
686
     }else{
687
 
688
     }
689
 
21823 rajender 690
       var isChecked = jQuery("input[name=businessModel]:checked").val();
21818 kshitij.so 691
      if(!isChecked){
692
         alert('Please select the BusinessModel');
693
          return false;
694
     }else{
695
         }
696
 
21823 rajender 697
        var isChecked = jQuery("input[name=sellingOnline]:checked").val();
21818 kshitij.so 698
      if(!isChecked){
699
          alert('Please select the Sellingonline');
700
           return false;
701
     }else{
702
         }
703
 
704
    var isChecked = jQuery("input[name=shopArea]:checked").val();
705
      if(!isChecked){
706
          alert('Please select the shopArea');
707
           return false;
708
     }else{
709
         }
710
 
21823 rajender 711
   var isChecked = jQuery("input[name=shopStatus]:checked").val();
21818 kshitij.so 712
      if(!isChecked){
713
          alert('Please select the shopstatus');
714
           return false;
715
     }else{
716
         }
717
 
718
 
719
            var isChecked = jQuery("input[name=shopAvailbility]:checked").val();
720
      if(!isChecked){
721
          alert('Please select the shopAvailbility');
722
           return false;
723
     }else{
724
         }
725
 
726
              var isChecked = jQuery("input[name=location]:checked").val();
727
      if(!isChecked){
728
          alert('Please select the Loacation of Shop');
729
           return false;
730
     }else{
731
         }
732
 
733
 
21823 rajender 734
         var isChecked = jQuery("input[name=nearestStore]:checked").val();
21818 kshitij.so 735
      if(!isChecked){
736
          alert('Please select the NearestStore');
737
           return false;
738
     }else{
739
         }
740
 
21823 rajender 741
      var isChecked = jQuery("input[name=ownership]:checked").val();
742
if(!isChecked){
743
  alert('Please select the ownership of Shop');
744
   return false;
745
}else{
746
 }
747
 
748
            var isChecked = jQuery("input[name=insurance]:checked").val();
21818 kshitij.so 749
      if(!isChecked){
750
          alert('Please select the Insurance field');
751
           return false;
752
     }else{
753
         }
754
 
755
     var isChecked = jQuery("input[name=loan]:checked").val();
756
      if(!isChecked){
757
          alert('Please select the loan field');
758
           return false;
759
     }else{
760
         }
761
 var isChecked = jQuery("input[type=checkbox]:checked").val();
762
      if(!isChecked){
763
          alert('Please select the Status of shop');
764
           return false;
765
     }
766
});
767
}