Open
Description
Hello,
I'm reporting an error I detected when I wanted to use in Bolt/Forms extension, parameters replyto_email
and replyto_name
.
The form returns me an error:
"An exception has been thrown during the rendering of a template ("Email "email" does not comply with addr-spec of RFC 2822.")."
After debugging, it turns out that the error comes from bolt/common, in the placeholders
method.
The regexp doesn't seem to be good at detecting the string sent to it.
Example to reproduce the bug:
- Install last bolt version
- Install last bolt/forms version
- Create form with notification parameters like that :
notification:
enabled: true
debug: false
debug_address: [email protected] # Email address used when debug mode is enabled
debug_smtp: true
subject: New contact
subject_prefix: '[XXX]'
to_name: 'John'
to_email: '[email protected]'
from_name: 'James'
from_email: '[email protected]'
replyto_name: lastname
replyto_email: email
- Add two fields
lastname:
type: text
fieldLabel: Nom
options:
required: true
label: Lastname
constraints: [ NotBlank ]
attr:
placeholder: Nom
email:
type: email
fieldLabel: Email
options:
required: true
constraints: [ NotBlank, Email ]
attr:
placeholder: Email
- Test form
- Error appear
Here a pr to fix it (works for me)
Metadata
Metadata
Assignees
Labels
No labels