public function isValid()
    {
        $value = $this->field->getValue();

        // field is empty and its not required. It's thus valid.
        if ($value == '' && $this->required == false) {
            return true;
        }

        $parsedDate = date_parse($value);

        if ($parsedDate['warning_count'] == 0 &&
            $parsedDate['error_count'] == 0 &&
            isset($parsedDate['year']) &&
            isset($parsedDate['month'])
        ) {
            return true;
        }

        return false;
    }