-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestForm.html
More file actions
2701 lines (2438 loc) · 134 KB
/
TestForm.html
File metadata and controls
2701 lines (2438 loc) · 134 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>InnerFormValidation - Demonstração Completa</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- Font Awesome for Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Popper.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<!-- Bootstrap JS -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<!-- InnerFormValidation Configuration -->
<script>
$.innerForm = {
verbose: true // Ativa logs detalhados no console
}
</script>
<!-- InnerFormValidation Library -->
<script src="InnerFormValidation.js"></script>
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.main-container {
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
margin: 20px auto;
padding: 30px;
}
.section-header {
background: linear-gradient(45deg, #667eea, #764ba2);
color: white;
padding: 15px 20px;
border-radius: 10px;
margin-bottom: 25px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.section-header h3 {
margin: 0;
display: flex;
align-items: center;
gap: 10px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
font-weight: 600;
color: #333;
margin-bottom: 8px;
display: block;
}
.form-control {
border: 2px solid #e1e5e9;
border-radius: 8px;
padding: 12px 15px;
transition: all 0.3s ease;
font-size: 14px;
}
.form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
outline: none;
}
/* Estados de Validação */
.success {
border-color: #28a745 !important;
box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15) !important;
background-color: rgba(40, 167, 69, 0.05);
}
.error {
border-color: #dc3545 !important;
box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
background-color: rgba(220, 53, 69, 0.05);
animation: shake 0.5s;
}
@keyframes shake {
0%,
100% {
transform: translateX(0);
}
25% {
transform: translateX(-5px);
}
75% {
transform: translateX(5px);
}
}
.has-error .form-control {
border-color: #dc3545;
}
/* Indicadores de força da senha */
.password-strength {
margin-top: 5px;
font-size: 12px;
}
[data-pwstrength="4"]+.password-strength::after {
content: "💪 Senha Forte";
color: #28a745;
font-weight: bold;
}
[data-pwstrength="3"]+.password-strength::after {
content: "👍 Senha Média";
color: #ffc107;
font-weight: bold;
}
[data-pwstrength="2"]+.password-strength::after,
[data-pwstrength="1"]+.password-strength::after {
content: "⚠️ Senha Fraca";
color: #dc3545;
font-weight: bold;
}
[data-pwstrength="0"]+.password-strength::after {
content: "❌ Muito Fraca";
color: #dc3545;
font-weight: bold;
}
/* Indicador de bandeira do cartão */
.card-flag {
margin-top: 5px;
font-size: 12px;
font-weight: bold;
}
[data-flagcard="visa"]+.card-flag::after {
content: "💳 Visa";
color: #1a1f71;
}
[data-flagcard="mastercard"]+.card-flag::after {
content: "💳 Mastercard";
color: #eb001b;
}
[data-flagcard="amex"]+.card-flag::after {
content: "💳 American Express";
color: #006fcf;
}
[data-flagcard="elo"]+.card-flag::after {
content: "💳 Elo";
color: #ffcb05;
}
/* Botões */
.btn-custom {
background: linear-gradient(45deg, #667eea, #764ba2);
border: none;
border-radius: 8px;
padding: 12px 30px;
color: white;
font-weight: 600;
transition: transform 0.2s, box-shadow 0.2s;
}
.btn-custom:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
color: white;
}
/* Status de validação em tempo real */
.validation-status {
margin-top: 5px;
font-size: 12px;
font-weight: bold;
}
.validation-status.valid {
color: #28a745;
}
.validation-status.invalid {
color: #dc3545;
}
/* Seções colapsáveis */
.collapse-section {
border: 1px solid #e9ecef;
border-radius: 10px;
margin-bottom: 20px;
overflow: hidden;
}
.collapse-header {
background: #f8f9fa;
padding: 15px 20px;
cursor: pointer;
border-bottom: 1px solid #e9ecef;
transition: background-color 0.2s;
}
.collapse-header:hover {
background: #e9ecef;
}
.collapse-content {
padding: 20px;
}
/* Responsive */
@media (max-width: 768px) {
.main-container {
margin: 10px;
padding: 20px;
}
.section-header h3 {
font-size: 1.3rem;
}
}
/* Tooltip customizado */
.tooltip-help {
position: relative;
display: inline-block;
cursor: help;
color: #6c757d;
margin-left: 5px;
}
.tooltip-help::after {
content: attr(data-tooltip);
position: absolute;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
background: #333;
color: white;
padding: 8px 12px;
border-radius: 6px;
font-size: 12px;
white-space: nowrap;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
z-index: 1000;
}
.tooltip-help:hover::after {
opacity: 1;
visibility: visible;
}
/* Destaque para campos obrigatórios */
.required-field label::after {
content: " *";
color: #dc3545;
font-weight: bold;
}
/* Botões de código */
.code-buttons {
position: absolute;
top: 0;
right: 0;
display: none;
background: rgba(255, 255, 255, 0.95);
border: 1px solid #e1e5e9;
border-radius: 6px;
padding: 4px;
z-index: 1000;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.form-group:hover .code-buttons {
display: flex;
}
.code-btn {
background: #667eea;
border: none;
color: white;
padding: 4px 8px;
margin: 0 2px;
border-radius: 4px;
font-size: 10px;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}
.code-btn:hover {
background: #5a67d8;
transform: translateY(-1px);
}
.code-btn:active {
transform: translateY(0);
}
.form-group {
position: relative;
}
/* Toast notification */
.toast-notification {
position: fixed;
top: 20px;
right: 20px;
background: #28a745;
color: white;
padding: 12px 20px;
border-radius: 6px;
z-index: 9999;
opacity: 0;
transform: translateX(100%);
transition: all 0.3s ease;
}
.toast-notification.show {
opacity: 1;
transform: translateX(0);
}
.toast-notification.error {
background: #dc3545;
}
</style>
</head>
<body>
<div class="container">
<div class="main-container">
<!-- Cabeçalho Principal -->
<div class="text-center mb-4">
<h1 class="display-4"
style="background: linear-gradient(45deg, #667eea, #764ba2); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: bold;">
<i class="fas fa-shield-alt"></i> InnerFormValidation
</h1>
<p class="lead text-muted">Demonstração completa de validação e mascaramento de formulários</p>
</div>
<form action="javascript:void(0)" class="validate" id="mainForm">
<!-- ========== SEÇÃO ESPECIAL: NÚMEROS COM SEPARADORES PERSONALIZADOS ========== -->
<div class="section-header">
<h3><i class="fas fa-sort-numeric-up"></i> Números com Separadores Personalizados</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label>Número com vírgula decimal e ponto milhar</label>
<input type="text" class="form-control mask num onkeyup" data-separator=","
data-thousand="." placeholder="1.234,56" />
<small class="text-muted">Use <code>data-separator=","</code> e
<code>data-thousand="."</code></small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Número com ponto decimal e vírgula milhar</label>
<input type="text" class="form-control mask num onkeyup" data-separator="."
data-thousand="," placeholder="1,234.56" />
<small class="text-muted">Use <code>data-separator="."</code> e
<code>data-thousand=","</code></small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Número com 3 casas decimais (sem milhar)</label>
<input type="text" class="form-control mask num onkeyup" data-decimal="3"
placeholder="1234,567" />
<small class="text-muted">Use <code>data-decimal="3"</code></small>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="alert alert-info">
<strong>Dica:</strong> Os atributos <code>data-separator</code>, <code>data-decimal</code> e
<code>data-thousand</code> permitem configurar o formato de entrada e validação de
números.<br>
<ul class="mb-0">
<li><code>data-separator</code>: separador decimal (ex: "," ou ".")</li>
<li><code>data-decimal</code>: número de casas decimais (ex: "2", "3")</li>
<li><code>data-thousand</code>: separador de milhares (ex: "." ou ",")</li>
</ul>
<span class="text-muted">A máscara e a validação respeitam esses atributos.</span>
</div>
</div>
</div>
<!-- ========== SEÇÃO 1: CAMPOS BÁSICOS ========== -->
<div class="section-header">
<h3><i class="fas fa-edit"></i> 1. Validações Básicas</h3>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group required-field">
<label>Campo Obrigatório
<i class="fas fa-question-circle tooltip-help"
data-tooltip="Este campo deve ser preenchido obrigatoriamente"></i>
</label>
<input type='text' placeholder="Digite algum texto" class='form-control obg onkeyup'
data-invalidmessage="Este campo é obrigatório! 📝" />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Email
<i class="fas fa-question-circle tooltip-help"
data-tooltip="Deve ser um email válido (ex: usuario@dominio.com)"></i>
</label>
<input type='text' placeholder="seuemail@exemplo.com" class='form-control email onkeyup' />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>URL/Link
<i class="fas fa-question-circle tooltip-help" data-tooltip="Digite uma URL válida"></i>
</label>
<input type='text' placeholder="https://exemplo.com.br" class='form-control url onkeyup' />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Apenas Números
<i class="fas fa-question-circle tooltip-help"
data-tooltip="Aceita apenas números (0-9)"></i>
</label>
<input type='text' placeholder="123456" class='form-control mask num onkeyup' />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
</div>
<!-- ========== SEÇÃO 2: VALIDAÇÃO DE CARACTERES ========== -->
<div class="section-header">
<h3><i class="fas fa-keyboard"></i> 2. Validação e Mascaramento de Caracteres</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label>Apenas Letras (com máscara)</label>
<input type='text' placeholder="Apenas letras" class='form-control mask alpha onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Letras e Números (com máscara)</label>
<input type='text' placeholder="ABC123" class='form-control mask alphanumeric onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Sem Espaços (com máscara)</label>
<input type='text' placeholder="SemEspacos" class='form-control mask nospace onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Apenas Maiúsculas (com máscara)</label>
<input type='text' placeholder="TEXTO EM MAIÚSCULAS"
class='form-control mask upper onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Apenas Minúsculas (com máscara)</label>
<input type='text' placeholder="texto em minúsculas"
class='form-control mask lower onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
</div>
<!-- ========== SEÇÃO 3: VALIDAÇÃO DE COMPRIMENTO ========== -->
<div class="section-header">
<h3><i class="fas fa-ruler"></i> 3. Validação de Comprimento</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label>Mínimo 5 caracteres</label>
<input type='text' placeholder="Mín. 5 chars" class='form-control minlen 5 onkeyup' />
<small class="text-muted">Digite pelo menos 5 caracteres</small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Máximo 10 caracteres</label>
<input type='text' placeholder="Máx. 10 chars" class='form-control maxlen 10 onkeyup' />
<small class="text-muted">Máximo 10 caracteres</small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Exatamente 8 caracteres (com máscara)</label>
<input type='text' placeholder="8 chars" class='form-control mask len 8 onkeyup' />
<small class="text-muted">Deve ter exatamente 8 caracteres</small>
</div>
</div>
<div class="col-md-12">
<div class="form-group">
<label>Números com Zeros à Esquerda (8 dígitos)</label>
<input type='text' placeholder="Digite um número"
class='form-control mask num len 8 leadingzero onkeyup' />
<small class="text-muted">Ex: Digite "123" e vira "00000123" ao sair do campo</small>
</div>
</div>
</div>
<!-- ========== SEÇÃO 4: DOCUMENTOS BRASILEIROS ========== -->
<div class="section-header">
<h3><i class="fas fa-id-card"></i> 4. Documentos Brasileiros</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label>CPF (com máscara e validação)</label>
<input type='text' placeholder="000.000.000-00" class='form-control mask cpf onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>CNPJ (com máscara e validação)</label>
<input type='text' placeholder="00.000.000/0000-00"
class='form-control mask cnpj onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>CPF ou CNPJ (automático)</label>
<input type='text' placeholder="CPF ou CNPJ" class='form-control mask cpfcnpj onkeyup' />
<small class="text-muted">Detecta automaticamente CPF ou CNPJ</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Telefone/Celular Brasileiro</label>
<input type='text' placeholder="(11) 99999-9999" class='form-control mask tel onkeyup' />
<small class="text-muted">Aceita telefone fixo e celular</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>CEP (com máscara)</label>
<input type='text' placeholder="00000-000" class='form-control mask cep onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
</div>
<!-- ========== SEÇÃO 5: DATA E HORA ========== -->
<div class="section-header">
<h3><i class="fas fa-calendar-alt"></i> 5. Data e Hora</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label>Data (dd/mm/aaaa)</label>
<input type='text' placeholder="dd/mm/aaaa" class='form-control mask date onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Hora Completa (hh:mm:ss)</label>
<input type='text' placeholder="hh:mm:ss" class='form-control mask time onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Hora Curta (hh:mm)</label>
<input type='text' placeholder="hh:mm" class='form-control mask timeshort onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Data e Hora Completa</label>
<input type='text' placeholder="dd/mm/aaaa hh:mm:ss"
class='form-control mask datetime onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Data e Hora Curta</label>
<input type='text' placeholder="dd/mm/aaaa hh:mm"
class='form-control mask datetimeshort onkeyup' />
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Minutos e Segundos</label>
<input type='text' placeholder="mm:ss" class='form-control mask minutesecond onkeyup' />
<small class="text-muted">Formato cronômetro</small>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label>Mês/Ano</label>
<input type='text' placeholder="mm/aaaa" class='form-control mask monthyear onkeyup' />
<small class="text-muted">Ex: validade de cartão</small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Período de Datas</label>
<input type='text' placeholder="dd/mm/aaaa ~ dd/mm/aaaa"
class='form-control mask daterange onkeyup'
data-invalidmessage="Digite um período válido! A primeira data deve ser anterior ou igual à segunda. 📅" />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
<small class="text-muted">Intervalo de datas</small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Período Mês/Ano</label>
<input type='text' placeholder="mm/aaaa ~ mm/aaaa"
class='form-control mask monthyearrange onkeyup'
data-invalidmessage="Digite um período de mês/ano válido! O primeiro período deve ser anterior ou igual ao segundo. 📆" />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
<small class="text-muted">Intervalo de mês/ano</small>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Período Mês/Ano Curto</label>
<input type='text' placeholder="mm/aa ~ mm/aa"
class='form-control mask shortmonthyearrange onkeyup'
data-invalidmessage="Digite um período de mês/ano curto válido! O primeiro período deve ser anterior ou igual ao segundo. 🗓️" />
<div class="validation-status"></div>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes
</button>
<button type="button" class="code-btn" onclick="copyAttributes(this)"
title="Copiar atributos">
<i class="fas fa-list"></i> Atributos
</button>
</div>
<small class="text-muted">Intervalo mês/ano (2 dígitos)</small>
</div>
</div>
</div>
<!-- ========== SEÇÃO 6: VALIDAÇÕES DE IDADE E COMPARAÇÃO ========== -->
<div class="section-header">
<h3><i class="fas fa-balance-scale"></i> 6. Validações de Idade e Comparação</h3>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group required-field">
<label>Data de Nascimento (18+ anos)</label>
<input type='text' placeholder="dd/mm/aaaa"
class='form-control mask date minage 18 onkeyup obg'
data-invalidmessage="Você deve ter pelo menos 18 anos! 🎂" />
<small class="text-muted">Deve ser maior de idade</small>
<div class="code-buttons">
<button type="button" class="code-btn" onclick="copyHTML(this)"
title="Copiar HTML completo">
<i class="fas fa-code"></i> HTML
</button>
<button type="button" class="code-btn" onclick="copyClasses(this)"
title="Copiar classes CSS">
<i class="fas fa-tags"></i> Classes