multipartkit/validate
Values
pub fn allowed_content_types(
the_part: part.Part,
allowed: List(String),
) -> Result(part.Part, error.MultipartError)
Validate that the part’s Content-Type media type (case-insensitive)
belongs to allowed. Parameters on the part’s Content-Type are ignored.
pub fn has_field(parts: List(part.Part), name: String) -> Bool
Return True if any part is a text field with the given name.
pub fn max_file_size(
the_part: part.Part,
max: Int,
) -> Result(part.Part, error.MultipartError)
Validate that the part body does not exceed max bytes.