Skip to content

incendium.util.validate_form

César Román edited this page May 1, 2024 · 12 revisions

Description

Warning

Deprecated since version 2024.5.0.

Performs a form validation.

Syntax

incendium.util.validate_form([strings], [numbers], [collections])

Args:

  • strings (dict): A dictionary containing all strings which must not be empty. Optional.
  • numbers (dict): A dictionary containing all numbers which must be greater than zero. Optional.
  • collections (dict): A dictionary containing all collections which must at least contain an element. Optional.

Returns:

  • tuple[bool, str]: A tuple containing: is_valid (bool): True if all validation tests have passed, False otherwise. error_message (str): Error message in case any validation test has failed.

Recommendations

Use incendium.gui.validate_form.

Code Examples

See code examples.

Clone this wiki locally