conditional validation

i want to validate text field only if i select dropdown value yes,if i select no then it will check validation

example

<?= $form->field($model, ‘inspection_required’)->dropDownList(app\modules\vehicle\models\Item::getitem()); ?>

getitem function is giving two value yes or no

if i select value yes from dropdown then it will validate below field value otherwise it will skip

<?= $form->field($model, ‘value’)->textInput([‘maxlength’ => 18]); ?>

how to do that in yii2

http://www.yiiframework.com/doc-2.0/guide-input-validation.html#conditional-validation ;)