OphTrOperationbooking_Operation_Sequence::rules PHP Method

rules() public method

public rules ( ) : array
return array validation rules for model attributes.
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        return array(array('theatre_id, start_date, start_time, end_time, interval_id', 'required'), array('end_date, week_selection, consultant, paediatric, anaesthetist, general_anaesthetic, firm_id, theatre_id, start_date, start_time, end_time, interval_id, weekday, default_admission_time', 'safe'), array('start_date', 'date', 'format' => 'yyyy-MM-dd'), array('start_time', 'date', 'format' => array('H:mm', 'H:mm:ss')), array('end_time', 'date', 'format' => array('H:mm', 'H:mm:ss')), array('end_date', 'checkDates'), array('end_time', 'checkTimes'), array('start_date', 'compareStartdateWithWeekday'), array('id, theatre_id, start_date, start_time, end_time, end_date, consultant, paediatric, anaesthetist, interval_id, weekday, week_selection, firm_id, site_id', 'safe', 'on' => 'search'));
    }