class_docstr: Accept ISO format Date (but not DateTime) values.
  
      
class_docstr_tok: ["Accept","ISO","format","Date","(","but","not","DateTime",")","values","."]
code: def validate(self, value: Any, detail: bool = True) -> None:
      super().validate(value, detail)
  
      # datetime.datetime is datetime.date, exclude manually up front
      if isinstance(value, datetime.datetime):
          msg = (
              ""
              if not detail
              else "Expected a date value, got a datetime.datetime"
          )
          raise ValueError(msg)
  
      if isinstance(value, datetime.date):
          return
  
      try:
          datetime.datetime.fromisoformat(value)
      except Exception:
          msg = (
              ""
              if not detail
              else f"Expected an ISO date string, got {value!r}"
          )
          raise ValueError(msg)
  
imports: from __future__ import annotations
  import logging
  import datetime
  from typing import Any, Union
  from ...util.serialization import convert_date_to_datetime, is_datetime_type, is_timedelta_type
  from .bases import Init, Property
  from .primitive import bokeh_integer_types
  from .singletons import Undefined
label_desc: Use image node_id 2 for calling the Date obj's underlying member method code with example usage: obj.validate(value, detail) without return types