fix: use path in error message

This commit is contained in:
Ben Irvin 2025-01-23 15:29:39 +01:00
parent 9efe8c85f4
commit 195eaa367f

View File

@ -23,7 +23,7 @@ export const username = yup.string().min(1);
export const password = yup
.string()
.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;
const byteSize = new TextEncoder().encode(value).length;
return byteSize <= 72;