Skip to content

Commit

Permalink
Merge pull request #189 from vtex/feat/new-birthdate-rule
Browse files Browse the repository at this point in the history
fix: adjust birthday rule
  • Loading branch information
pscruzzz authored Apr 24, 2024
2 parents 8f637af + 7a9a1fc commit ccfeba2
Show file tree
Hide file tree
Showing 41 changed files with 82 additions and 109 deletions.
2 changes: 1 addition & 1 deletion react/__mocks__/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',

},
{
name: 'lastName',
Expand Down
5 changes: 2 additions & 3 deletions react/rules/ARG.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/AUS.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/BEL.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
2 changes: 1 addition & 1 deletion react/rules/BRA.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
mask: (value) => msk.fit(value, '99/99/9999'),
validate: isPastDate,
},
],
Expand Down
5 changes: 2 additions & 3 deletions react/rules/CAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/CHL.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/COL.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/CRI.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/CZE.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
1 change: 0 additions & 1 deletion react/rules/DEU.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
Expand Down
5 changes: 2 additions & 3 deletions react/rules/DNK.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/ECU.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/ESP.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/FIN.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/FRA.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/GBR.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/GTM.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
1 change: 0 additions & 1 deletion react/rules/HUN.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
mask: (value) => msk.fit(value, '9999.99.99.'),
},
Expand Down
5 changes: 2 additions & 3 deletions react/rules/IDN.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/IND.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/ITA.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/KOR.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/MEX.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/NZL.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/PAN.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/PER.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
2 changes: 1 addition & 1 deletion react/rules/POL.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',

validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
Expand Down
5 changes: 2 additions & 3 deletions react/rules/PRT.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/PRY.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
2 changes: 1 addition & 1 deletion react/rules/ROU.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',

validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
Expand Down
2 changes: 1 addition & 1 deletion react/rules/RUS.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',

validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
Expand Down
2 changes: 1 addition & 1 deletion react/rules/SGP.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',

validate: isPastDate,
mask: (value) => msk.fit(value, '99.99.9999'),
},
Expand Down
5 changes: 2 additions & 3 deletions react/rules/SVK.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
5 changes: 2 additions & 3 deletions react/rules/SWE.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ export default {
name: 'birthDate',
maxLength: 30,
label: 'birthDate',
type: 'date',
validate: isPastDate,
},

validate: isPastDate, mask: (value) => msk.fit(value, '99/99/9999')},
],
businessFields: [
{
Expand Down
Loading

0 comments on commit ccfeba2

Please sign in to comment.