const handleSubmit = async () => { // Frontend validation first if (!validateForm()) return;