Skip to content

Improve architecture of composing error messages for each validation error code #4071

@westonruter

Description

@westonruter

Feature description

Add translatable error messages for each specific error code, removing the logic from \AMP_Validation_Error_Taxonomy::get_error_title_from_code() and into the respective sanitizer that originated the validation error. Improve structure of validation error to make it easier to construct messages. For example, harmonize node_attributes and element_attributes to just element_attributes.

So this is more of an architectural issue rather than providing just providing error message translations, which is already in progress. This involves adding validation error objects.

Related: #3664, #3780, #3817, #1420.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions