mirror of
https://github.com/strapi/strapi.git
synced 2025-08-29 19:22:24 +00:00
fix: use path in error message
This commit is contained in:
parent
9efe8c85f4
commit
195eaa367f
@ -23,7 +23,7 @@ export const username = yup.string().min(1);
|
|||||||
export const password = yup
|
export const password = yup
|
||||||
.string()
|
.string()
|
||||||
.min(8)
|
.min(8)
|
||||||
.test('required-byte-size', 'Password must be less than 73 bytes', (value) => {
|
.test('required-byte-size', '${path} must be less than 73 bytes', (value) => {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
const byteSize = new TextEncoder().encode(value).length;
|
const byteSize = new TextEncoder().encode(value).length;
|
||||||
return byteSize <= 72;
|
return byteSize <= 72;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user