Join our network of trusted partners and distribute high-quality filters for transport refrigeration units (TRUs). Please fill out the form below, and our team will contact you shortly.
Contact Us
Thank you for choosing TRU Filter.
Your satisfaction is always our #1 priority. Please shoot us a message here or directly at info@tru-filters.com
We will respond to you as soon as possible!
document.addEventListener('DOMContentLoaded', function () {
const form = document.querySelector('form');
const phoneInput = document.getElementById('phone');
function formatPhoneNumber(value) {
// Remove everything except digits and leading +
let cleaned = value.replace(/[^\d+]/g, '');
// Keep the leading + if present
let hasPlus = cleaned.startsWith('+');
cleaned = cleaned.replace(/\D/g, ''); // Remove all non-digits
// Insert spaces every 3-4 digits (basic readable format)
let grouped = cleaned.replace(/(\d{3,4})(?=\d)/g, '$1 ').trim();
return hasPlus ? '+' + grouped : grouped;
}
if (form && phoneInput) {
// Validate on submit
form.addEventListener('submit', function (e) {
const rawValue = phoneInput.value;
const cleaned = rawValue.replace(/\s+/g, '');
const phonePattern = /^\+?[0-9\-()]{7,20}$/;
if (!phonePattern.test(cleaned)) {
e.preventDefault();
alert("Please enter a valid phone number, including country code.");
phoneInput.focus();
}
});
// Format on blur
phoneInput.addEventListener('blur', function () {
phoneInput.value = formatPhoneNumber(phoneInput.value);
});
}
});