You are here

function img_assist_admin_settings_validate in Image Assist 5.3

Same name and namespace in other branches
  1. 5 img_assist.module \img_assist_admin_settings_validate()
  2. 5.2 img_assist.module \img_assist_admin_settings_validate()
  3. 6.2 img_assist.module \img_assist_admin_settings_validate()
  4. 6 img_assist.module \img_assist_admin_settings_validate()

Validate Image Assist settings.

File

./img_assist.module, line 450
Image Assist module

Code

function img_assist_admin_settings_validate($form_id, $form_values) {

  // img_assist_max_size must contain a value for width and height.
  if (!preg_match('/\\d+x\\d+/', $form_values['img_assist_max_size'])) {
    form_set_error('img_assist_max_size', t('Allowed maximum inline image size has to indicate width and height, for example %example.', array(
      '%example' => '200x300',
    )));
  }
}