Fixes #2380: `yii\widgets\ActiveForm` will register validation js even if there are not fields inside