Skip to content

Sanitizing blanks #299

@leore

Description

@leore

Is there a way in joi to change '' or ' ' to null for all optional parameters that are strings?

Right now I have to pass a .allow('') when a parameter is because joi by default does not accept '' and then i have to check each parameter to see if its blank and rename to null.

Can a setting be added to sanitize all empty string and string with spaces to null and an option to allow empty strings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew functionality or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions