Bug report
Summary
The fields in the &validate parameter are separated by commas.
And if there is an extra character before / after the field (space, line break, etc.), then field validation does not work.
Clearly uncoordinated field splitting, it's worth adding a trim() or something like that.
Step to reproduce
For example, if you set the parameter like this, validation of the last field (message) does not work.
&validate=`
name:required,
email:email,
phone:required,
message:required
`

But if you remove the line break, then everything will work:
&validate=`
name:required,
email:email,
phone:required,
message:required`

Observed behavior
Field validation does not work.
Expected behavior
Validation should work.
Environment
Related issue - #251
FormIt 4.2.7-pl
MODX 2.8.4
Bug report
Summary
The fields in the
&validateparameter are separated by commas.And if there is an extra character before / after the field (space, line break, etc.), then field validation does not work.
Clearly uncoordinated field splitting, it's worth adding a
trim()or something like that.Step to reproduce
For example, if you set the parameter like this, validation of the last field (message) does not work.
But if you remove the line break, then everything will work:
Observed behavior
Field validation does not work.
Expected behavior
Validation should work.
Environment
Related issue - #251
FormIt 4.2.7-pl
MODX 2.8.4