Wix Events: Validate user input on Event registration page

For Wix Events, I have some custom fields in the registration page. When the user fills the registration form and clicks on Continue/Submit, I want to run a function that validates the input in the form. Is there a way to do this?

Thank you

Hello.

This work for me:

export function button19_click(event) {
 let name = $w('#input2').value;
 let codigoS = $w('#input1').value;
  wixData.query('Invitados')
    .eq('nombreCompleto', name)
    .eq('codigo', codigoS)
    .find()
    .then(res => {
 if (res.length === 0) {
        $w('#text96').show();
 // name not found in DB
      }
 else if (res.items[0].codigo === $w('#input1').value) {
        $w('#text95').show();
        wixLocation.to('/home');
 // same birthday value
 //aprove mensage
      }
 else {
 
      }
    })
}

nombre // input 2 (This is the name of the user)
Codigo ingreso // input 1 (This is the code i give it)
Ingresar // button19

So, when i push the button19 this compare in the data and valide the information, then let me see a mensage You pass/ not Pass, and then let me go to the page “home”

Hope this work for you as example.

Thank you Claudio for your quick response! Unfortunately, the registration page for Wix Events doesn’t allow access to any button or anything. Check the attached image: The button or any form element doesn’t show any public property. That’s why I am unable to add any code for the button click.