wisdom #2

Merged
yogiedigital merged 126 commits from wisdom into main 2025-10-20 03:26:33 +00:00
Showing only changes of commit ad0f44669b - Show all commits

View File

@@ -32,6 +32,19 @@ const loginSchema = Joi.object({
captcha: Joi.string().required(),
captchaText: Joi.string().required()
});
const newPasswordSchema = Joi.object({
new_password: Joi.string()
.min(8)
.pattern(/[A-Z]/, 'uppercase letter')
.pattern(/[a-z]/, 'lowercase letter')
.pattern(/\d/, 'number')
.pattern(/[!@#$%^&*(),.?":{}|<>]/, 'special character')
.required()
.messages({
'string.min': 'Password must be at least 8 characters long',
'string.pattern.name': 'Password must contain at least one {#name}'
})
})
// ========================
// Device Validation
@@ -94,6 +107,7 @@ const userSchema = Joi.object({
module.exports = {
registerSchema,
loginSchema,
newPasswordSchema,
deviceSchema,
deviceUpdateSchema,
userSchema,