E-Mail Field is not required but shows "Invalid e-mailadress"-notification if empty

Permalink Browser Info Environment
I've an email-field but it's not required with de checkbox "When enabled, the submitted value will be required and checked."

When I fill the form and send I get the message "Field E-Mail is an invalid e-mailadress". I think it's better to not validate the e-mail if it isn't required. Or I'm wrong? How can I change this?

Thanks!

Type: Ticket
Status: In Progress
webpresso
View Replies:
DeWebmakers replied on at Permalink Reply
DeWebmakers
Hi,

How are you?

In case any value is set in the field it will be validated. The field is an email address field and should be filled in so. If required is enabled the field is always validated.

If you want to change this, change the /src/Formidable/Element/Emailaddress.php
Change the method validateResult.

Best,

Corretje

concrete5 Environment Information

Concrete5 8.2.1
Formidable Lite 1.0.7

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:55.0) Gecko/20100101 Firefox/55.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.