You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I input an invalid email address (e.g. 'm') in an email field and send it, I get a php exception:
Swift_RfcComplianceException
Address in mailbox given [m] does not comply with RFC 2822, 3.6.2.
Someone in the forum mentioned, that it is possible to enable HTML5 client side check: http://getgrav.org/forum#!/?Swift_RfcComplianceException
However, this option does nothing, because I have it enabled, please check if this is true?
What I want
The email check should be done serverside. The contact form should pop up again, where the email field is marked red, and the user see that the email is invalid. Also maybe gets a text message.
PS: In the docs I found nothing mentioned about validation rules
PPS: IMPORTANT, I found out that the docs has an error in the sample code which I copy-pasted: http://learn.getgrav.org/advanced/forms
type: text
for the field email is wrong. So the client side HTML rule is not applied.
The text was updated successfully, but these errors were encountered:
I suggested that in the forum, actually I'm not sure where I got that.
If you use the email field type instead of text, the email address is already validated in browsers that support the email field (http://caniuse.com/#feat=input-email-tel-url). Plus, it's validated server-side.
You're right, I fixed the Learn site docs, you can fix them too next time, just click "Edit this page" on the top right of it and post a PR ;)
When I input an invalid email address (e.g. 'm') in an email field and send it, I get a php exception:
Someone in the forum mentioned, that it is possible to enable HTML5 client side check:
http://getgrav.org/forum#!/?Swift_RfcComplianceException
However, this option does nothing, because I have it enabled, please check if this is true?
What I want
The email check should be done serverside. The contact form should pop up again, where the email field is marked red, and the user see that the email is invalid. Also maybe gets a text message.
PS: In the docs I found nothing mentioned about validation rules
PPS: IMPORTANT, I found out that the docs has an error in the sample code which I copy-pasted:
http://learn.getgrav.org/advanced/forms
for the field email is wrong. So the client side HTML rule is not applied.
The text was updated successfully, but these errors were encountered: