str2d.Str2D.validate_valign
- classmethod Str2D.validate_valign(valign: str) str [source]
Validate the vertical alignment. The vertical alignment can be ‘top’, ‘middle’, or ‘bottom’. It will lower case the input and raise a ValueError if the input is not one of the valid options.
- Parameters:
valign (str) – The vertical alignment.
- Returns:
The validated vertical alignment.
- Return type:
str
- Raises:
ValueError – If the vertical alignment is not ‘top’, ‘middle’, or ‘bottom’.