the-tip-top-backend/src/validations/newsletter.validation.js
soufiane 0850614264 feat: redesign newsletter email with modern template
- Redesign email template with brand colors and modern layout
- Add animated welcome icon and professional styling
- Improve button design with gradient colors matching the site
- Add TLS configuration to fix SSL certificate errors
- Fix email validation regex to be more permissive
- Update email subject to include logo emoji

Design improvements:
- Logo in header with brand colors (#d4a574, #c4956a, #5a5a4e)
- Beautiful rounded buttons for "Jouer Maintenant" and "Visiter le Site"
- Responsive design with proper spacing and shadows
- Benefits section with visual icons
- Professional footer with unsubscribe link

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 14:49:40 +01:00

32 lines
705 B
JavaScript

/**
* Schémas de validation avec Zod pour la newsletter
*/
import { z } from 'zod';
// Schéma pour l'abonnement à la newsletter
export const subscribeSchema = z.object({
body: z.object({
email: z
.string({
required_error: 'L\'email est requis',
})
.regex(/^[^\s@]+@[^\s@]+\.[^\s@]+$/, 'Format d\'email invalide'),
}),
});
// Schéma pour le désabonnement de la newsletter
export const unsubscribeSchema = z.object({
body: z.object({
email: z
.string({
required_error: 'L\'email est requis',
})
.regex(/^[^\s@]+@[^\s@]+\.[^\s@]+$/, 'Format d\'email invalide'),
}),
});
export default {
subscribeSchema,
unsubscribeSchema,
};