You are here

function update_unit_pricing_form_validate in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Validate callback form update_unit_pricing_form form.

See also

update_unit_pricing_form()

1 string reference to 'update_unit_pricing_form_validate'
update_unit_pricing_form in modules/rooms_pricing/rooms_pricing.module
A basic form that allows us to update the state of the calendar.

File

modules/rooms_pricing/rooms_pricing.module, line 250
Manages pricing for Bookable Units and displaying dates on the jquery FullCalendar plugin.

Code

function update_unit_pricing_form_validate(&$form, &$form_state) {

  // Make sure amount entered is numeric.
  if (!empty($form_state['values']['amount']) && !is_numeric($form_state['values']['amount'])) {
    form_set_error('amount', t('%name: you must enter a numeric value for the price.', array(
      '%name' => 'Amount',
    )));
  }
}