brew.validators¶
-
validators.
validate_grain_type
(grain_type)¶
-
validators.
validate_hop_type
(hop_type)¶
-
validators.
validate_percentage
(percent)¶
-
validators.
validate_units
(units)¶
-
validators.
validate_required_fields
(data, required_fields)¶ Validate fields which are required as part of the data.
data: a python dict required_fields: a list of tuples where the first element is a string with
a value that should be a key found in the data dict and where the second element is a python type or list/tuple of python types to check the field against.
-
validators.
validate_optional_fields
(data, optional_fields, data_field='data')¶ Validate fields which are optional as part of the data.
data: a python dict optional_fields: a list of tuples where the first element is a string with
a value that should be a key found in the data dict and where the second element is a python type or list/tuple of python types to check the field against.