Fix icon hover colors, text alignment, and UI improvements
This commit is contained in:
+10
-1
@@ -156,10 +156,19 @@ function submitMessage() {
|
||||
}
|
||||
|
||||
// Validate email
|
||||
if (!filter_var($data['email'], FILTER_VALIDATE_EMAIL)) {
|
||||
$email = trim((string)($data['email'] ?? ''));
|
||||
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||
jsonResponse(['success' => false, 'message' => 'Invalid email address'], 400);
|
||||
}
|
||||
|
||||
// Validate phone format if provided (basic check)
|
||||
if (!empty($data['phone'])) {
|
||||
$phone = preg_replace('/[^\d+\-() ]/', '', (string)$data['phone']);
|
||||
if (strlen($phone) < 5) {
|
||||
jsonResponse(['success' => false, 'message' => 'Invalid phone number'], 400);
|
||||
}
|
||||
}
|
||||
|
||||
// Honeypot check (if implemented in form)
|
||||
if (!empty($data['website'])) {
|
||||
// Likely a bot
|
||||
|
||||
Reference in New Issue
Block a user