# `Ash.Type.CompositeTypeHelpers`
[🔗](https://github.com/ash-project/ash/blob/v3.27.8/lib/ash/type/composite_type_helpers.ex#L5)

Shared utilities for composite type validation and error handling.

This module provides common functions used by composite types like
TypedStruct, Map, Keyword, and Struct for handling validation errors
and converting them to consistent formats.

# `convert_constraint_errors_to_keyword_lists`

Converts constraint errors to keyword list format, ensuring each error
has a :field key set to the specified field name.

This is used by Map, Keyword, and Struct types to normalize error formats
from nested type validations.

# `convert_errors_to_invalid_attributes`

Converts validation errors from composite types to InvalidAttribute exceptions.

Handles multiple error formats:
- Single keyword list errors
- Lists of keyword list errors
- Other error formats (passed through to Ash.Error.to_ash_error)

For backward compatibility with typed_struct.ex, returns a single error
for single error lists, and multiple errors for multiple error lists.

# `filter_non_informative_errors`

Filters out non-informative constraint errors.

Removes constraint key-value pairs that don't provide meaningful
error messages to users.

# `format_comprehensive_error_as_keyword`

Formats a single constraint error as a comprehensive keyword list.

This handles the complex error formatting logic from struct.ex, including
filtering out non-informative constraint key-value pairs and ensuring
proper field assignment.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
