Skip to content

Commit

Permalink
fix(regex): households must be integers, percentages must be positive
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-belcher authored Dec 7, 2023
1 parent 4f38d73 commit e628e2d
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions src/services/api/layers/ABP1/v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value: /^-?\d*\.?\d+$/,
value: /^\d*\.?\d+$/,
message:
"Must be a percentage",
"Must be a positive percentage",
},
required: "* Required",
},
Expand All @@ -451,9 +451,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value: /^-?\d*\.?\d+$/,
value: /^\d*\.?\d+$/,
message:
"Must be a percentage",
"Must be a positive percentage",
},
required: "* Required",
},
Expand All @@ -474,9 +474,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value: /^-?\d*\.?\d+$/,
value: /^\d*\.?\d+$/,
message:
"Must be a percentage",
"Must be a positive percentage",
},
required: "* Required",
},
Expand Down Expand Up @@ -530,10 +530,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value:
/^\d*\.?\d+$/,
value: /^\d*$/,
message:
"Must be a positive numerical value",
"Must be a positive integer value",
},
required:
"* Required",
Expand Down Expand Up @@ -663,10 +662,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value:
/^\d*\.?\d+$/,
value: /^\d*$/,
message:
"Must be a positive numerical value",
"Must be a positive integer value",
},
required:
"* Required",
Expand Down Expand Up @@ -800,10 +798,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value:
/^\d*\.?\d+$/,
value: /^\d*$/,
message:
"Must be a positive numerical value",
"Must be a positive integer value",
},
required:
"* Required",
Expand Down Expand Up @@ -936,10 +933,9 @@ const ABP1: FormSchema = {
},
rules: {
pattern: {
value:
/^\d*\.?\d+$/,
value: /^\d*$/,
message:
"Must be a positive numerical value",
"Must be a positive integer value",
},
required:
"* Required",
Expand Down

0 comments on commit e628e2d

Please sign in to comment.