I have a dropdownlist with other option have text field. now i want to validate both dropdownlist and text-field. Validation apply according to the selection i.e. dropdown or text-field. How can i apply this.
Year come from dopedown. Here i have id
['year', 'integer'],
Or come from text field . Here i have year
['year', 'integer', 'min' => 1900, 'max' => date('Y')],