@tap-payments/auth-jsconnect 2.0.104-test → 2.0.105-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/constants/validation.d.ts +1 -0
- package/build/constants/validation.js +1 -0
- package/build/features/bank/screens/BankDetails/Beneficiary.js +2 -4
- package/build/features/bank/screens/BankDetails/validation.js +2 -2
- package/build/utils/validation.d.ts +1 -0
- package/build/utils/validation.js +3 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export declare const VALID_FILE_FORMATS: string[];
|
|
|
13
13
|
export declare const REGEX_FULL_NAME: RegExp;
|
|
14
14
|
export declare const REGEX_WEBSITE: RegExp;
|
|
15
15
|
export declare const REGEX_BENEFICIARY_NAME: RegExp;
|
|
16
|
+
export declare const REGEX_ALPHANUMERIC: RegExp;
|
|
16
17
|
export declare const REGEX_BRAND_NAME: RegExp;
|
|
17
18
|
export declare const EMAIL_MAX_LENGTH = 50;
|
|
18
19
|
export declare const LINKEDIN_URL: RegExp;
|
|
@@ -13,6 +13,7 @@ export var VALID_FILE_FORMATS = ['image/jpeg', 'image/png', 'image/jpg', 'applic
|
|
|
13
13
|
export var REGEX_FULL_NAME = /^([a-zA-Z]{2,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,}|[a-zA-Z]+\s{1}[a-zA-Z.-]{1,}\s{1}[a-zA-Z]{1,})$/g;
|
|
14
14
|
export var REGEX_WEBSITE = /^[a-zA-Z0-9]+([\-\.]{1}[a-zA-Z0-9]+)*\.[a-zA-Z]{2,63}(:[0-9]{1,5})?(\/.*)?$/;
|
|
15
15
|
export var REGEX_BENEFICIARY_NAME = /^([\u0600-\u065F\u066A-\u06EF\u06FA-\u06FFa-zA-Z()\s])*$/g;
|
|
16
|
+
export var REGEX_ALPHANUMERIC = /^[a-zA-Z0-9!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/? ]*$/g;
|
|
16
17
|
export var REGEX_BRAND_NAME = /^(([a-zA-Z0-9])+\s)*[a-zA-Z0-9]+$/;
|
|
17
18
|
export var EMAIL_MAX_LENGTH = 50;
|
|
18
19
|
export var LINKEDIN_URL = /^((http|https):\/\/)(www.linkedin.com\/)in(\/)[a-zA-Z0-9-]+$/;
|
|
@@ -3,8 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import Input from '../../../shared/Input';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useController, useFormContext } from 'react-hook-form';
|
|
6
|
-
import { styled } from '@mui/material';
|
|
7
|
-
import { removeArabicWords } from '../../../../utils';
|
|
6
|
+
import { styled } from '@mui/material/styles';
|
|
8
7
|
import { ScreenContainer } from '../../../shared/Containers';
|
|
9
8
|
import { bankSelector } from '../../../app/bank/bankStore';
|
|
10
9
|
import { useAppSelector } from '../../../../hooks';
|
|
@@ -41,8 +40,7 @@ var Beneficiary = function () {
|
|
|
41
40
|
}, []);
|
|
42
41
|
var handleBeneficiaryChange = function (_a) {
|
|
43
42
|
var target = _a.target;
|
|
44
|
-
|
|
45
|
-
beneficiaryControl.field.onChange(value);
|
|
43
|
+
beneficiaryControl.field.onChange(target.value);
|
|
46
44
|
};
|
|
47
45
|
var clearValue = function () {
|
|
48
46
|
beneficiaryControl.field.onChange('');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MAX_FILE_SIZE, VALID_FILE_FORMATS, REGEX_ALPHANUMERIC } from '../../../../constants';
|
|
2
2
|
import * as yup from 'yup';
|
|
3
3
|
export var BankValidation = yup.object().shape({
|
|
4
4
|
iban: yup
|
|
@@ -10,7 +10,7 @@ export var BankValidation = yup.object().shape({
|
|
|
10
10
|
bankName: yup.string().optional(),
|
|
11
11
|
beneficiaryName: yup
|
|
12
12
|
.string()
|
|
13
|
-
.matches(
|
|
13
|
+
.matches(REGEX_ALPHANUMERIC, 'beneficiary_name_invalid')
|
|
14
14
|
.required('beneficiary_name_required'),
|
|
15
15
|
bankStatementId: yup.string().optional(),
|
|
16
16
|
bankStatementFile: yup
|
|
@@ -14,3 +14,4 @@ export declare function isPasswordHasSpecialLetter(password: string): boolean;
|
|
|
14
14
|
export declare const keepLettersAndSpace: (str: string) => string;
|
|
15
15
|
export declare const isTapDomain: (domain: string) => boolean;
|
|
16
16
|
export declare const removeArabicWords: (str: string) => string;
|
|
17
|
+
export declare const removeAllOtherThanArabicWords: (str: string) => string;
|