Utilities

Model validators

qgreenland.util.model_validators.reusable_validator(name, validation_func)[source]

Provide a common way to re-use validator functions.

Parameters
  • name (str) –

  • validation_func (Callable[[...], Any]) –

Return type

classmethod

qgreenland.util.model_validators.validate_paragraph_text(text)[source]

Validate paragraph text has appropriate content.

Paragraph text must not be empty, must begin with an upper-case letter, and must end with a period.

Parameters

text (str) –