SMS feature not working (Twilio)

Hi J.D. as requested:

import { sendMessage } from ‘backend/twilioService’ ;

$w . onReady ( function () {

$w ( '#sendButton' ). onClick (() => { 
    **if**  ( validateForm ()) { 
        **const**  toPhone  =  $w ( '#toPhoneInput' ). value ; 
        **const**  message  =  $w ( '#messageInput' ). value ; 

        $w ( '#successMessage' ). hide (); 
        $w ( '#errorMessage' ). hide (); 
        sendMessage ( toPhone ,  message ). then (() => { 
            $w ( '#successMessage' ). show (); 
        }). **catch** (() => { 
            $w ( '#errorMessage' ). show (); 
        }) 
    }  **else**  { 
        updateFormValidation (); 
    } 
}); 

});

function validateForm ( ) {
return $w ( ‘#toPhoneInput’ ). valid && $w ( ‘#messageInput’ ). valid ;
}

function updateFormValidation ( ) {
$w ( ‘#toPhoneInput’ ). updateValidityIndication ();
$w ( ‘#messageInput’ ). updateValidityIndication ();
}