/** * Validate value * @return boolean */ public function validate() { $this->setFields(); if (!isset($_POST[$this->getFieldDayName()]) || !isset($_POST[$this->getFieldDaytimeName()])) { return; } $date = $_POST[$this->getFieldDayName()]; $time = $_POST[$this->getFieldDaytimeName()]; $this->FieldDay->validate(); $this->FieldDaytime->validate(); $_POST[$this->name] = strtotime($date . ' ' . $time); }