fix(SW-360): set default validate behaviour to onBlur on signup page

This commit is contained in:
Chuma McPhoy
2024-11-20 17:54:57 +01:00
parent 70000afe1f
commit 0865a553cd
6 changed files with 9 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
const email = intl.formatMessage({ id: "Email address" })
const phoneNumber = intl.formatMessage({ id: "Phone number" })
const zipCode = intl.formatMessage({ id: "Zip code" })
const acceptTermsText = intl.formatMessage({ id: "signupPage.terms" })
const signupButtonText = intl.formatMessage({
id: "Sign up to Scandic Friends",
})
@@ -66,8 +67,9 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
zipCode: "",
},
password: "",
termsAccepted: false,
},
mode: "all",
mode: "onBlur",
criteriaMode: "all",
resolver: zodResolver(signUpSchema),
reValidateMode: "onChange",
@@ -157,9 +159,7 @@ export default function SignupForm({ link, subtitle, title }: SignUpFormProps) {
</header>
<Checkbox name="termsAccepted" registerOptions={{ required: true }}>
<Body>
{intl.formatMessage({
id: "Yes, I accept the Terms and conditions for Scandic Friends and understand that Scandic will process my personal data in accordance with",
})}{" "}
{acceptTermsText}{" "}
<Link
variant="underscored"
color="peach80"

View File

@@ -465,6 +465,7 @@
"points": "Point",
"room type": "værelsestype",
"room types": "værelsestyper",
"signupPage.terms": "Ja, jeg accepterer vilkårene og betingelserne for Scandic Friends og forstår, at Scandic vil behandle mine personlige data i overensstemmelse med",
"special character": "speciel karakter",
"spendable points expiring by": "{points} Brugbare point udløber den {date}",
"to": "til",

View File

@@ -464,6 +464,7 @@
"points": "Punkte",
"room type": "zimmerart",
"room types": "zimmerarten",
"signupPage.terms": "Ja, ich akzeptiere die Allgemeinen Geschäftsbedingungen für Scandic Friends und verstehe, dass Scandic meine persönlichen Daten gemäß",
"special character": "sonderzeichen",
"spendable points expiring by": "{points} Einlösbare punkte verfallen bis zum {date}",
"to": "zu",

View File

@@ -504,6 +504,7 @@
"room type": "room type",
"room types": "room types",
"signup.terms": "By signing up you accept the Scandic Friends <termsLink>Terms and Conditions</termsLink>. Your membership is valid until further notice, and you can terminate your membership at any time by sending an email to Scandics customer service",
"signupPage.terms": "Yes, I accept the Terms and conditions for Scandic Friends and understand that Scandic will process my personal data in accordance with",
"special character": "special character",
"spendable points expiring by": "{points} spendable points expiring by {date}",
"to": "to",

View File

@@ -461,6 +461,7 @@
"points": "poeng",
"room type": "romtype",
"room types": "romtyper",
"signupPage.terms": "Ja, jeg godtar vilkårene og betingelsene for Scandic Friends og forstår at Scandic vil behandle mine personopplysninger i henhold til",
"special character": "spesiell karakter",
"spendable points expiring by": "{points} Brukbare poeng utløper innen {date}",
"to": "til",

View File

@@ -462,6 +462,7 @@
"points": "poäng",
"room type": "rumtyp",
"room types": "rumstyper",
"signupPage.terms": "Ja, jag accepterar villkoren för Scandic Friends och förstår att Scandic kommer att behandla mina personuppgifter i enlighet med",
"special character": "speciell karaktär",
"spendable points expiring by": "{points} poäng förfaller {date}",
"to": "till",