i m not getting custom validation ,i read yii2 custom validation from documentation and from reference guide,but still confuse
how this code will work
like i have to field start_date and end_date
i want when user select date from calender then it will check user subscription period ,so i need show error when user select date befor or after of subscription date
user selecting start_date 2014-01-02 and end date 2014-05-02
if user selcting date in any form where i have datepicker it will check user subscription date if it is lying between then ok otherwise gives error.
my code
in model rules
[start_date,valideStart_date],
[end_date,valideEnd_date],
public function valideStart_date($attributes,$params){
here just check if select date is bigger then start_date then it is ok
otherwise gives error
}
same for end date
how to do this