skip vaidation if ajax callback
This commit is contained in:
@@ -123,7 +123,13 @@ function booking_variety_session_form_callback($form, &$form_state) {
|
|||||||
function booking_variety_regn_form_validate($form, &$form_state) {
|
function booking_variety_regn_form_validate($form, &$form_state) {
|
||||||
global $event;
|
global $event;
|
||||||
$values = $form_state['input'];
|
$values = $form_state['input'];
|
||||||
watchdog('booking_debug', 'booking_variety_regn_form_submit: <pre>@info</pre>', array('@info' => print_r( $form_state, true)));
|
watchdog('booking_debug', 'booking_variety_regn_form_validate: <pre>@info</pre>', array('@info' => print_r( $form_state, true)));
|
||||||
|
|
||||||
|
// Don't run validation on ajax callback
|
||||||
|
if (isset($form_state['input']['_triggering_element_name'])) {
|
||||||
|
watchdog('booking_debug', 'booking_variety_regn_form_validate: skipping due to ajax callback');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//verify that user-entered data is a number
|
//verify that user-entered data is a number
|
||||||
if (! preg_match('/^[0-9]+$/', $values['booking_nid'])) {
|
if (! preg_match('/^[0-9]+$/', $values['booking_nid'])) {
|
||||||
|
Reference in New Issue
Block a user