Skip to content

Commit

Permalink
fix: rename validatePostiveInteger to accomodate required
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhishekA1509 committed Feb 1, 2024
1 parent af2aee8 commit 8f8f514
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Pages/GlobalConfigurations/BuildInfra/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
validateName,
validateRequiredPositiveNumber,
getCommonSelectStyle,
validatePositiveInteger,
validateRequiredPositiveInteger,
} from '../../../Shared'

export const validateRequestLimit = ({
Expand Down Expand Up @@ -288,7 +288,7 @@ export const useBuildInfraForm = ({
unit,
}

currentInputErrors[BuildInfraConfigTypes.BUILD_TIMEOUT] = validatePositiveInteger(value).message
currentInputErrors[BuildInfraConfigTypes.BUILD_TIMEOUT] = validateRequiredPositiveInteger(value).message
break
}

Expand Down
2 changes: 1 addition & 1 deletion src/Shared/validations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const validateRequiredPositiveNumber = (value: string | number): Validati
}
}

export const validatePositiveInteger = (value: string | number): ValidationResponseType => {
export const validateRequiredPositiveInteger = (value: string | number): ValidationResponseType => {
if (!value) {
return {
isValid: false,
Expand Down

0 comments on commit 8f8f514

Please sign in to comment.