diff --git a/src/apps/patron-page/PatronPage.dev.tsx b/src/apps/patron-page/PatronPage.dev.tsx index 309f3964c1..03812aa98f 100644 --- a/src/apps/patron-page/PatronPage.dev.tsx +++ b/src/apps/patron-page/PatronPage.dev.tsx @@ -241,8 +241,9 @@ export default { control: { type: "text" } }, phoneInputMessageText: { + name: "Phone input validation message", defaultValue: - "The phone number should be from Denmark (+45), Germany (+49), or Greenland (+299)", + "The phone number must be 6 to 15 characters in length and should either be comprised solely of numbers or begin with a +", control: { type: "text" } } } diff --git a/src/components/contact-info-section/ContactInfoPhone.tsx b/src/components/contact-info-section/ContactInfoPhone.tsx index e586cf5a17..e8e8aed13e 100644 --- a/src/components/contact-info-section/ContactInfoPhone.tsx +++ b/src/components/contact-info-section/ContactInfoPhone.tsx @@ -29,7 +29,7 @@ const ContactInfoPhone: FC = ({ id="phone-input" required={isRequired} type="tel" - pattern="(\+45|0045)[0-9]{8}|(\+49|0049)[0-9]{7,11}|(\+299|00299)[0-9]{6}" + pattern="\+?[0-9]{6,15}" title={t("phoneInputMessageText")} onChange={(newPhoneNumber) => changePatron(newPhoneNumber, "phoneNumber")