Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/plugins/Ajv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ const directoryPath: FormatDefinition<string> = {

const userPassword: FormatDefinition<string> = {
validate: str => {
// 8..32 characters, at least one letter and one number
return 8 <= str.length && str.length <= 32 && /[a-z]/i.test(str) && /\d/.test(str);
return str.length > 0;
},
};

Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/login/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ export const loginEmailSchema = {
}),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/login/phone/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export const loginPhoneSchema = {
phone: Type.String(),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/register/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export const registerEmailSchema = {
code: Type.Integer(),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/register/phone/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export const registerPhoneSchema = {
code: Type.Integer(),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/reset/email/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export const resetEmailSchema = {
code: Type.Integer(),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
2 changes: 0 additions & 2 deletions src/v2/controllers/reset/phone/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export const resetPhoneSchema = {
code: Type.Integer(),
password: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down
4 changes: 0 additions & 4 deletions src/v2/controllers/user/password/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ export const userPasswordSchema = {
password: Type.Optional(
Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
),
newPassword: Type.String({
format: "user-password",
minLength: 8,
maxLength: 32,
}),
},
{
Expand Down