Gregwar\Formidable\Fields\DateField::check PHP Метод

check() публичный Метод

public check ( )
    public function check()
    {
        $this->generate();
        $filled = 0;
        foreach ($this->fields as $field) {
            if ($field->getValue() && !$field->check()) {
                $filled++;
            }
        }
        if ($this->required && $filled == 0 || $filled > 0 && $filled < count($this->fields)) {
            return array('bad_date', $this->printName());
        }
    }