Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Translations Not Loading for Global Zod Validators Error Messages and Improve Patient Registration Error Messages #10581

Merged
Merged
2 changes: 1 addition & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@
"phone_number": "Phone Number",
"phone_number_at_current_facility": "Phone Number of Contact person at current Facility",
"phone_number_min_error": "Phone number must be at least 10 characters long",
"phone_number_must_be_10_digits": "Phone number must be a 10-digit mobile number",
"phone_number_required": "Phone number is required",
"phone_number_not_found": "Phone number not found",
"phone_number_validation_error": "Entered phone number is not valid",
"phone_number_verified": "Phone Number Verified",
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default () => ({

required: z
.string()
.min(1, { message: t("phone_number_must_be_10_digits") })
.min(1, { message: t("phone_number_required") })
.refine((val) => isValidPhoneNumber(val), {
message: t("phone_number_validation_error"),
}),
Expand Down
Loading