Skip to content

Commit

Permalink
(PC-31828)[PRO] fix: add '.' to EAN format err mess
Browse files Browse the repository at this point in the history
  • Loading branch information
asaez-pass committed Sep 17, 2024
1 parent 0d34661 commit fb242ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getValidationSchema = (lastProvider?: string | null) => ({
.string()
.matches(/^\d*$/, "L'EAN doit être composé de 13 chiffres")
.test({
message: "L'EAN doit être composé de 13 chiffres",
message: "L'EAN doit être composé de 13 chiffres.",
test: (ean) => ean === undefined || ean.length === 13,
}),
speaker: yup.string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export const validationSchema = yup.object().shape({
.string()
.matches(/^\d*$/, "L'EAN doit être composé de 13 chiffres")
.test({
message: "L'EAN doit être composé de 13 chiffres",
message: "L'EAN doit être composé de 13 chiffres.",
test: (ean) => ean === undefined || ean.length === 13,
}),
eanSearch: yup
.string()
.matches(/^\d*$/, "L'EAN doit être composé de 13 chiffres")
.test({
message: "L'EAN doit être composé de 13 chiffres",
message: "L'EAN doit être composé de 13 chiffres.",
test: (ean) => ean === undefined || ean.length === 13,
}),
speaker: yup.string(),
Expand Down

0 comments on commit fb242ee

Please sign in to comment.