| @@ 152-161 (lines=10) @@ | ||
| 149 | $val->set_rules('confirm_password', lang('Password Confirm field', 'auth'), 'trim|required|xss_clean'); |
|
| 150 | ||
| 151 | /** Проверка по кастомным полям */ |
|
| 152 | foreach (ShopCore::app()->CustomFieldsHelper->getCustomFielsdAsArray('user') as $item) { |
|
| 153 | ||
| 154 | if ($item['is_active'] == 1) { |
|
| 155 | if ($item['is_required'] == 1) { |
|
| 156 | $val->set_rules('custom_field['. $item['id'] .']', lang($item['field_name']), 'trim|xss_clean|required'); |
|
| 157 | } else { |
|
| 158 | $val->set_rules('custom_field['. $item['id'] .']', lang($item['field_name']), 'trim|xss_clean'); |
|
| 159 | } |
|
| 160 | } |
|
| 161 | } |
|
| 162 | ||
| 163 | if ($this->dx_auth->captcha_registration) { |
|
| 164 | if ($this->dx_auth->use_recaptcha) { |
|
| @@ 213-224 (lines=12) @@ | ||
| 210 | ||
| 211 | if (SHOP_INSTALLED) { |
|
| 212 | /** Проверка по кастомным полям */ |
|
| 213 | foreach (ShopCore::app()->CustomFieldsHelper->getCustomFielsdAsArray('user') as $item) { |
|
| 214 | ||
| 215 | if ($item['is_active'] == 1) { |
|
| 216 | if ($item['is_required'] == 1) { |
|
| 217 | $val->set_rules('custom_field[' . $item['id'] . ']', lang($item['field_name']), 'trim|xss_clean|required'); |
|
| 218 | } else { |
|
| 219 | $val->set_rules('custom_field[' . $item['id'] . ']', lang($item['field_name']), 'trim|xss_clean'); |
|
| 220 | } |
|
| 221 | } |
|
| 222 | } |
|
| 223 | } |
|
| 224 | ||
| 225 | if ($this->dx_auth->captcha_registration) { |
|
| 226 | if ($this->dx_auth->use_recaptcha) { |
|
| 227 | $val->set_rules('recaptcha_response_field', lang('Code protection', 'auth'), 'trim|xss_clean|required|callback_captcha_check'); |
|