Skip to content

Commit

Permalink
fix: resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Sep 21, 2023
1 parent 38e537d commit 10a8e7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/ValidationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import CONST from '../CONST';
import * as CardUtils from './CardUtils';
import * as LoginUtils from './LoginUtils';
import {Report} from '../types/onyx';
import * as OnyxCommon from '../types/onyx/OnyxCommon';

/**
* Implements the Luhn Algorithm, a checksum formula used to validate credit card
Expand Down Expand Up @@ -87,8 +88,8 @@ function isRequiredFulfilled(value: string | Date | unknown[] | Record<string, u
/**
* Used to add requiredField error to the fields passed.
*/
function getFieldRequiredErrors(values: Record<string, string>, requiredFields: string[]) {
const errors: Record<string, string> = {};
function getFieldRequiredErrors(values: OnyxCommon.Errors, requiredFields: string[]) {
const errors: OnyxCommon.Errors = {};
requiredFields.forEach((fieldKey) => {
if (isRequiredFulfilled(values[fieldKey])) {
return;
Expand Down

0 comments on commit 10a8e7e

Please sign in to comment.