fix(email): fix payload #53

Merged
zain_arif merged 1 commits from lavoce into main 2026-06-05 09:39:12 +00:00
Showing only changes of commit d7747b6f83 - Show all commits

View File

@@ -36,21 +36,21 @@ const DetailContact = memo(function DetailContact(props) {
})); }));
} }
// if (name === 'email') { if (name === 'email') {
// const email = value.trim(); const email = value.trim();
// setFormData((prev) => ({ setFormData((prev) => ({
// ...prev, ...prev,
// [name]: email, [name]: email,
// })); }));
// setErrors((prev) => ({ setErrors((prev) => ({
// ...prev, ...prev,
// email: email:
// email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) email && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)
// ? 'Format email tidak valid' ? 'Format email tidak valid'
// : '', : '',
// })); }));
// } }
}; };
@@ -118,7 +118,7 @@ const DetailContact = memo(function DetailContact(props) {
const contactData = { const contactData = {
contact_name: formData.name, contact_name: formData.name,
contact_phone: formData.phone.replace(/[\s\-\(\)]/g, ''), // Clean phone number contact_phone: formData.phone.replace(/[\s\-\(\)]/g, ''), // Clean phone number
// contact_email: formData.email?.trim(), email: formData.email?.trim(),
is_active: formData.is_active, is_active: formData.is_active,
}; };