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 6cb03a6 commit 38e537d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/ValidationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import {Report} from '../types/onyx';
* Implements the Luhn Algorithm, a checksum formula used to validate credit card
* numbers.
*/
function validateCardNumber(val: string): boolean {
function validateCardNumber(value: string): boolean {
let sum = 0;
for (let i = 0; i < val.length; i++) {
let intVal = parseInt(val.substr(i, 1), 10);
for (let i = 0; i < value.length; i++) {
let intVal = parseInt(value.substr(i, 1), 10);
if (i % 2 === 0) {
intVal *= 2;
if (intVal > 9) {
Expand Down Expand Up @@ -235,7 +235,7 @@ function validateIdentity(identity: Record<string, string>): Record<string, bool
return errors;
}

function isValidUSPhone(phoneNumber = '', isCountryCodeOptional?: boolean) {
function isValidUSPhone(phoneNumber = '', isCountryCodeOptional?: boolean): boolean {
const phone = phoneNumber || '';
const regionCode = isCountryCodeOptional ? CONST.COUNTRY.US : undefined;

Expand Down

0 comments on commit 38e537d

Please sign in to comment.