update room number field to be an integer
This commit is contained in:
@@ -425,6 +425,18 @@ function booking_rooms_definition_form($node, &$form_state, $create, $room_id =
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the form for adding room definitions
|
||||
*/
|
||||
function booking_rooms_definition_form_validate($form, $form_state) {
|
||||
//make sure room number is numerical
|
||||
$values = $form_state['input'];
|
||||
|
||||
if (! is_numeric($values['booking_room_number'])) {
|
||||
form_set_error('booking_room_number', t('Room number must be numeric. If you need to use a more descriptive label, please use the room label field.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the form for adding room definitions
|
||||
*/
|
||||
|
Reference in New Issue
Block a user