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!
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: | Archived |
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