Validate the input format, ensure it matches the correct style
(self)
| 453 | return self._fmt.find(self.asctime_search) >= 0 |
| 454 | |
| 455 | def validate(self): |
| 456 | """Validate the input format, ensure it matches the correct style""" |
| 457 | if not self.validation_pattern.search(self._fmt): |
| 458 | raise ValueError("Invalid format '%s' for '%s' style" % (self._fmt, self.default_format[0])) |
| 459 | |
| 460 | def _format(self, record): |
| 461 | if defaults := self._defaults: |