/** * @see ObjectModel::validateField() */ public function validateField($field, $value, $id_lang = null) { $value = $field == 'description_short' ? strip_tags($value) : $value; return parent::validateField($field, $value, $id_lang); }
/** * @see ObjectModel::validateField() */ public function validateField($field, $value, $id_lang = null, $skip = array(), $human_errors = false) { if ($field == 'description_short') { $limit = (int) Configuration::get('PS_PRODUCT_SHORT_DESC_LIMIT'); if ($limit <= 0) { $limit = 800; } $size_without_html = Tools::strlen(strip_tags($value)); $size_with_html = Tools::strlen($value); $this->def['fields']['description_short']['size'] = $limit + $size_with_html - $size_without_html; } return parent::validateField($field, $value, $id_lang, $skip, $human_errors); }
/** * @see ObjectModel::validateField() */ public function validateField($field, $value, $id_lang = null, $skip = array(), $human_errors = false) { $value = $field == 'description_short' ? strip_tags($value) : $value; return parent::validateField($field, $value, $id_lang, $skip, $human_errors); }