Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

behnaz/MARK-1062/regex-password #7176

Closed
6 changes: 2 additions & 4 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"71535160": "Calculate the overnight fees for holding any open positions. The fees can be positive or negative depending on your swap rate.",
"71630191": "Do not share your account information and other personal details with anyone via Telegram.",
"71650838": "Speak simply and plainly, and not hide behind ambiguity",
"71755468": "In a journey spanning more than 23 years, we have grown to over 2.5 million customers worldwide. But our mission has remained the same:",
"73765361": "Chief Audit Executive",
"74138086": "Take control of your trades on Deriv MT5",
"74593350": "3. Select Real account or Demo account.",
Expand Down Expand Up @@ -749,6 +750,7 @@
"706931524": "When you purchase a 'High-Close' contract, your payout will be equal to the difference between the highest price and the exit price over the duration of the contract multiplied by the multiplier.",
"710137133": "Apply now",
"712547410": "total trade turnover",
"713610866": "Please enter a valid postcode with 2-10 Latin characters.",
"714321435": "laptop mt5",
"714478782": "<0>AUD Basket</0> measures the value of the Australian dollar against a basket of five global currencies (USD, EUR, GBP, JPY, CAD), each weighted by 20%.",
"715753532": "Find your role with us by browsing Deriv job opportunities in Cyberjaya, Malaysia.",
Expand Down Expand Up @@ -2010,7 +2012,6 @@
"1872216697": "Yes, you can choose the duration of your Asians contract anywhere between 5 and 10 ticks.",
"1872568231": "GBP/TRY",
"1872607463": "banner",
"1873174451": "Postcode is required",
"1873182175": "Apple account sign in page",
"1873188024": "A deal for 1 lot of the Volatility Index 75 for a price of USD 500,000 per USD 100,000 turnover will pay out a commission of USD 5. The minimum volume required to receive the minimum commission of USD 0.01 is determined using this formula:",
"1874424045": "I lost my phone. How can I disable two-factor authentication (2FA)?",
Expand Down Expand Up @@ -4379,8 +4380,6 @@
"-420140433": "Company registration number is required",
"-173029411": "You should enter 2-20 numbers, characters.",
"-1430656728": "Password is required",
"-2092237088": "You should enter 2-10 numbers, characters.",
"-1049534775": "Please enter a valid postcode with Latin characters.",
"-1979098157": "Website url is required",
"-1857429287": "Last Name",
"-1702877392": "Important guidelines",
Expand Down Expand Up @@ -4702,7 +4701,6 @@
"-1520902282": "No credit card needed",
"-2022759357": "Make trading accessible to anyone, anywhere",
"-77779780": "From inception, our goal was to break free of the high commissions and clunky products offered by traditional brokers. Also, we aim to deliver a first-class experience to digitally inclined traders, regardless of the size of their accounts.",
"-1321496264": "In a journey spanning 25 years, we have grown to over 2.5 million customers worldwide. But our mission has remained the same:",
"-554746075": "Integrity",
"-1917169640": "We serve our customers with fairness and transparency. We settle all contracts by the book and speak plainly and truthfully.",
"-1679427554": "Customer focus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export const affiliate_validation_regex = {
value.length <= 50,
phone: (value: string) => /^\+?\d+$/.test(value),
username: (value: string) => /^[A-Za-z0-9_]{3,20}$/.test(value),
password: (value: string) => /^(?=.*[a-z])(?=.*[0-9])(?=.*[A-Z])[ -~]{6,50}$/.test(value),
password: (value: string) =>
/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?!.*\W)(?!.* ).{8,50}$/.test(value),
city: (value: string) =>
/^[\p{L}][\p{L}\s'.-]{0,49}$/u.test(value) &&
value.trim().length >= 2 &&
Expand Down Expand Up @@ -95,27 +96,16 @@ const phoneValidation = (input: string) => {
}
const passwordValidation = (input: string) => {
if (!input) return localize('_t_Password is required_t_')
else if (input.length < 8 || input.length > 50) {
else if (input.length < 8 || input.length > 50)
return localize('_t_You should enter 8-50 characters._t_')
} else if (
!affiliate_validation_regex.password(input) ||
!affiliate_validation_regex.non_empty_string(input)
) {
else if (!affiliate_validation_regex.password(input))
return localize(
'_t_Password should have lower and uppercase English letters with numbers._t_',
)
}
}
const postcodeValidation = (input: string) => {
if (!input) return localize('_t_Postcode is required_t_')
else if (input.length < 2 || input.length > 10) {
return localize('_t_You should enter 2-10 numbers, characters._t_')
} else if (
!affiliate_validation_regex.postal_code(input) ||
!affiliate_validation_regex.non_empty_string(input)
) {
return localize('_t_Please enter a valid postcode with Latin characters._t_')
}
if (!affiliate_validation_regex.postal_code(input))
return localize('_t_Please enter a valid postcode with 2-10 Latin characters._t_')
}
const streetValidation = (input: string) => {
if (!input) return localize('_t_Street is required_t_')
Expand Down
Loading