Skip to content

Idea: Unifying sanitizing in validators #2158

@WikiRik

Description

@WikiRik

Just making an issue now so we don't forget about it, but we'll discuss this in the future. In #2144 (comment) and #2157 (comment) it came up how the validators should handle sanitization (if at all). We should try to unify it through the various validators so it is clear to the user what their role is. This might also be considered a breaking change so I don't think we need to change this anytime soon (and even so we can start with an opt-in possibly)

Examples of current sanitization include;

const sanitized = str.trim();

const sanitized = card.replace(/[- ]+/g, '');

const sanitized = str.replace(/[\s-]+/g, '');

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions