onValidatePaymentsForm

The onValidatePaymentsForm handler is called when an event RSVP form has been submitted.

You can check the $post variable for submitted RSVP form values and return an error message string if the validation fails.

<?php
     $_LW->REGISTERED_APPS['my_app']=[
       'title'=>'My App',
       'handlers'=>['onValidatePaymentsForm'],
    ];

    class LiveWhaleApplicationMyApp {

      public function onValidatePaymentsForm($post) { // when validating an event RSVP
      global $_LW;
      $errors = '';
      if ($post['lw_payments_field_first_name'] == 'Test') { // require location
          $errors .='"Test" is not a valid first name.<br/>';
      };
      return $errors;
    }

   }
?>