Skip to content

Form validation shouldn't trim values before validation #6237

Open
@Gaffi81

Description

@Gaffi81

Form validator trims whitespaces from values before validation, which is really unwanted.
For example, " 123" validates as "integer".
Or " aaaa" validates against regexp[/^[a-z0-9]*$/i], but it shouldn't, as space is not a valid char, but the validator receives the form value as space-trimmed...

Currently I have to add custom validators, which validates against input value instead of the "value" param...

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