Trouble with Yii Client Side Validation

I am having quite a bit of trouble getting client side validation to work. I have these fields once in which the client side val works, and the other where it doesnt work.

I have debugged the yiiActiveForm javascript and have found two differences:

This json item works when validation is ran:






		"validate":function (attribute, value, messages, deferred, $form) {

		yii.validation.required(value, messages, {"message":"Selected Plan cannot be blank."});

		yii.validation.string(value, messages, {

			"message":"Selected Plan must be a string.",




This one doesn’t work: Obviously because there appears to be a problem with the container arg.






		"validate":function (attribute, value, messages, deferred, $form) {

			yii.validation.required(value, messages, {

				"message":"WHMCS Ticket Id cannot be blank."});



The rules array is pretty simple:

public function rules() 


        return  array_merge([

            [['selPlan', 'whmcs_ticket_id'], 'required'],

            [['selPlan'], 'string'],

        ], parent::rules()); 


The only other difference is that this input field which doesnt work exists in a partial. But when I require the partial, I do pass the same activeform.

Any help would be appreciated.

I have sorted this issue out, was able to debug the $this->attributes (where $this is the controller instance inside the view) and sorted it out from there.