We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug mixed.label(label: string): Schema overrides not only the key name in the error message, but also the key itself
To Reproduce Until version 0.30.0, I have this code running properly in a Formik-Form with a Yup-ValidationSchema:
const validationSchema = object({ email: string() .label(t("email")) .email(t("email_valid")) .required(t("field_required")) });
NOTE: the t("xxx") texts were built with an i18n library
Expected behavior
The expected behaviour was that the error was shown as: "key-name": "XXXXXXXXXXXXXXX -> text where the key-name is replaced by the label"
Current behavior
In version 0.30.0 the behaviour is: "label": "XXXXXXXXXXXXXXX -> text where the key-name is replaced by the label"
That makes that the Formik-Form-Field does not recognize that error as the one corresponding to the Field-key.
The validation throws the error correctly, but the key is changed, and therefore the Field does not find the error corresponding to its key.
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered:
ba23eb7
No branches or pull requests
Describe the bug
mixed.label(label: string): Schema overrides not only the key name in the error message, but also the key itself
To Reproduce
Until version 0.30.0, I have this code running properly in a Formik-Form with a Yup-ValidationSchema:
const validationSchema = object({
email: string()
.label(t("email"))
.email(t("email_valid"))
.required(t("field_required"))
});
NOTE: the t("xxx") texts were built with an i18n library
Expected behavior
The expected behaviour was that the error was shown as:
"key-name": "XXXXXXXXXXXXXXX -> text where the key-name is replaced by the label"
Current behavior
In version 0.30.0 the behaviour is:
"label": "XXXXXXXXXXXXXXX -> text where the key-name is replaced by the label"
That makes that the Formik-Form-Field does not recognize that error as the one corresponding to the Field-key.
The validation throws the error correctly, but the key is changed, and therefore the Field does not find the error corresponding to its key.
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: