inline validator function not working for model in yii2

I am new to Yii and i am creating offer for products thats why I have implemented several model at create function in controller

public function actionCreate()


{


    $model = new Offer();


    $wmodel = new Wmoffer();


    $pmodel = new Product();


    $ummodel = new Unitofmeasurement();


    $qvmodel = new OfferingValue();


    $blmodel = new OfferLocation();


   


   if ($model->load(Yii::$app->request->post()) && $model->validate()) {


    // code manipulation


   }else{


       return $this->render('create', [


            'model' => $model,


            'wmodel' => $wmodel,


            'pmodel' => $pmodel,


            'qvmodel' => $qvmodel,


            'blmodel' => $blmodel,


            'ummodel' => $ummodel


        ]); 


   }

all of my model extends by ActiveRecord aspect Wmoffer() this model looks like as below

use Yii;


use yii\base\Model;


use yii\web\UploadedFile;


use yii\helpers\FileHelper;





class Wmoffer extends Model


{


   public $bIsProductOrService;


   public $iCatalogueID;


   public $imageProduct;


   public $nHasCurrencyValue;


   public $nHasCurrencyValueMRP;


   public $BusinesslocationIds;


   





   public function rules() 


   { 


     // validation rules 

Now i need to implement inline validator for start,end date comparison [Start Date should be greater than End Date ]

i have tried this and this but this is not working i know something is missing which causes this

Any suggestions will be appreciable. Thanks

This works for me.

You may share your code which does not work so that somebody will find out the reason.