/** * @inheritdoc */ public function rules() { return [[['datetime'], 'safe'], [['height'], 'number'], [['measure'], 'string'], [['sensorid'], 'required'], [['sensorid'], 'integer'], [['yourname', 'youremail'], 'string', 'max' => 255], [['sensorid'], 'exist', 'skipOnError' => true, 'targetClass' => Sensor::className(), 'targetAttribute' => ['sensorid' => 'id']], ['measure', 'in', 'range' => [self::MEASURE_MM, self::MEASURE_CM, self::MEASURE_M]]]; }
/** * @inheritdoc */ public function rules() { return [[['startdate', 'enddate'], 'safe'], [['sensorid'], 'required'], [['sensorid'], 'integer'], [['filelink', 'filename', 'extension', 'status'], 'string', 'max' => 255], [['sensorid'], 'exist', 'skipOnError' => true, 'targetClass' => Sensor::className(), 'targetAttribute' => ['sensorid' => 'id']]]; }