Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing trim on validate rules #237

Open
Jako opened this issue Apr 15, 2020 · 0 comments
Open

Missing trim on validate rules #237

Jako opened this issue Apr 15, 2020 · 0 comments

Comments

@Jako
Copy link

Jako commented Apr 15, 2020

Bug report

Summary

There is a missing trim on the validate rules. The last rule needs to be empty (by adding a trailing comma after the last rule) or all rules have to be finished directly with the backtick.

Step to reproduce

This does not work:

                      &validate=`
                        name:required,
                        email:email:required,
                        message:required,
                        dsgvo:required
                      `

This works fine:

                      &validate=`
                        name:required,
                        email:email:required,
                        message:required,
                        dsgvo:required,
                      `

This works fine, too:

                      &validate=`
                        name:required,
                        email:email:required,
                        message:required,
                        dsgvo:required`

Observed behavior

The last rule is not executed.

Expected behavior

The last rule should be executed.

Environment

FormIt 4.2.5, MODX 2.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant