Skip to content

Commit

Permalink
fix: fix parent
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-deriv committed Nov 9, 2022
1 parent b9d0f49 commit 2b15485
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export type TOptions = {
regex?: RegExp;
};

const validRequired = (value?: string /* , options, field */) => {
const validRequired = (value?: string | number /* , options, field */) => {
if (value === undefined || value === null) {
return false;
}

const str = value.replace(/\s/g, '');
const str = value.toString().replace(/\s/g, '');
return str.length > 0;
};
export const validAddress = (value: string) => !/[`~!$%^&*_=+[}{\]\\"?><|]+/.test(value);
Expand Down

0 comments on commit 2b15485

Please sign in to comment.