Skip to content

Commit

Permalink
chore: re use numeric value in validatePositiveInteger
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Feb 1, 2024
1 parent c1eb25d commit f5a348b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Shared/validations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const validateRequiredPositiveNumber = (value: string | number): Validati
}
}

if (Number(value) <= 0) {
if (numericValue <= 0) {
return {
isValid: false,
message: MESSAGES.VALID_POSITIVE_NUMBER,
Expand Down Expand Up @@ -117,7 +117,7 @@ export const validatePositiveInteger = (value: string | number): ValidationRespo
}
}

if (Number(value) <= 0) {
if (numericValue <= 0) {
return {
isValid: false,
message: MESSAGES.VALID_POSITIVE_INTEGER,
Expand Down

0 comments on commit f5a348b

Please sign in to comment.