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());
        }
    }