@jlandis1/guessphrase-shared 1.0.35 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auth.js +1 -1
- package/dist/src/phrase.js +1 -1
- package/package.json +1 -1
package/dist/src/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export const username = z.string().min(1, 'Username is required').max(
|
|
2
|
+
export const username = z.string().min(1, 'Username is required').max(20, 'Username cannot be more than 20 characters');
|
|
3
3
|
const email = z
|
|
4
4
|
.string()
|
|
5
5
|
.email('Email is invalid')
|
package/dist/src/phrase.js
CHANGED
|
@@ -7,7 +7,7 @@ const phrase = z.preprocess((v) => (typeof v === 'string' ? v.toLowerCase().trim
|
|
|
7
7
|
.max(150, 'Phrase cannot be more than 150 characters')
|
|
8
8
|
.regex(/^[A-Za-z]+( [A-Za-z]+)*$/, 'Only letters and single spaces are allowed')
|
|
9
9
|
.refine((v) => v.split(' ').every((word) => word.length <= 15), { message: 'Each word must be 15 characters or less' }));
|
|
10
|
-
const hint = z.string().max(
|
|
10
|
+
const hint = z.string().max(200, 'Hint cannot be more than 200 characters').nullable();
|
|
11
11
|
const date = z.string().regex(/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, {
|
|
12
12
|
message: 'Date must be in format YYYY-MM-DD'
|
|
13
13
|
});
|