Yii
1
Вклад в тег
route-nopull
# vk.com
route 87.240.160.0 255.255.224.0
route 95.213.0.0 255.255.128.0
route 185.32.248.0 255.255.255.0
route 95.142.192.96 255.255.255.224
route 95.142.192.128 255.255.255.128
route 95.142.193.0 255.255.255.0
route 95.142.194.0 255.255.254.0
route 95.142.196.0 255.255.252.0
# mail.ru
route 94.100.176.0 255.255.248.0
route 94.100.184.0 255.255.248.0
route 128.140.168.0 255.255.252.0
route 185.5.136.0 255.255.254.0
route 195.218.168.0 255.255.255.0
route 217.69.128.0 255.255.240.0
# yandex.ru
route 5.255.255.0 255.255.255.0
route 87.250.247.0 255.255.255.0
route 213.180.192.0 255.255.224.0
route 178.154.131.0 255.255.255.0
route 87.250.251.0 255.255.255.0
route 93.158.134.0 255.255.255.0
[['phone', 'phone_other'], 'required', 'when' => function ($model) {
$validate = empty($model->phone) && empty($model->phone_other);
if ($validate) { return false; }
return true;
}, 'whenClient' => "function (attribute, value) {
if($('#order-phone').val() == '' && $('#order-phone_other').val() == ''){
$('.field-order-phone, .field-order-phone_other').addClass( 'has-error' ).find('.help-block-error').text( 'Необходимо заполнить хотя бы одно из полей «Телефон» или «Доп. Телефон»');
return true;
} else {
$('.field-order-phone, .field-order-phone_other').removeClass( 'has-error' ).find('.help-block-error').text('');
return false;
}
}", 'message' => 'Необходимо заполнить хотя бы одно из полей «Телефон» или «Доп. Телефон»'],