You are here

function img_assist_admin_settings_validate in Image Assist 6

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

Validate Image Assist settings.

File

./img_assist.module, line 387
Image Assist module

Code

function img_assist_admin_settings_validate($form, &$form_state) {

  // img_assist_max_size must contain a value for width and height.
  if (!preg_match('/\\d+x\\d+/', $form_state['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',
    )));
  }
}