function rooms_booking_handler_unit_filter::value_validate in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Validate the options form.
Overrides views_handler_filter::value_validate
File
- modules/
rooms_booking/ views/ rooms_booking_handler_unit_filter.inc, line 113
Class
Code
function value_validate($form, &$form_state) {
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {
return;
}
$values = drupal_explode_tags($form_state['values']['options']['value']);
$units = $this
->validate_unit_strings($form['value'], $values);
if ($units) {
$form_state['values']['options']['value'] = $units;
}
}