Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact Form: Email validation regex needs updating #3734

Closed
aheckler opened this issue Apr 26, 2016 · 5 comments · Fixed by #9323
Closed

Contact Form: Email validation regex needs updating #3734

aheckler opened this issue Apr 26, 2016 · 5 comments · Fixed by #9323
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Contact Form Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug
Milestone

Comments

@aheckler
Copy link
Member

aheckler commented Apr 26, 2016

A sharp-eyed user has noticed that the email validation regex here:

https://github.com/Automattic/jetpack/blob/4.0.2/modules/contact-form/js/grunion.js#L502

... no longer matches the one specified here:

http://www.regular-expressions.info/email.html

Perhaps we should update? This also applies to WP.com's version of grunion.js.

2635373-t

@aheckler aheckler added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] Contact Form labels Apr 26, 2016
@jeherve jeherve added this to the Community milestone Apr 26, 2016
@salomestarbuck
Copy link

Hi, just wondering if the decision was made to update this? I'm wondering if it is what is causing me to have so much trouble modifying the 'required' text and the text on the 'Submit' button on the contact form. Whatever is going on with the regex is causing the rest of the code to be unrecognized as JS in the editor. Thanks!

@jeherve
Copy link
Member

jeherve commented May 2, 2016

@salomestarbuck We haven't made any changes to that feature yet.

modifying the 'required' text and the text on the 'Submit' button on the contact form. Whatever is going on with the regex is causing the rest of the code to be unrecognized as JS in the editor

It's worth noting that you can use the jetpack_required_field_text filter to change the "required" text:
https://jetpack.com/2016/03/18/hook-of-the-month-customizing-contact-forms/

To change the submit button text, you can use a custom shortcode parameter, submit_button_text, as explained here:
https://jetpack.com/support/contact-form/#customize-submit

@salomestarbuck
Copy link

Thank you!!!

On Mon, May 2, 2016 at 12:02 AM, Jeremy Herve notifications@github.com
wrote:

@salomestarbuck https://github.com/salomestarbuck We haven't made any
changes to that feature yet.

modifying the 'required' text and the text on the 'Submit' button on the
contact form. Whatever is going on with the regex is causing the rest of
the code to be unrecognized as JS in the editor

It's worth noting that you can use the jetpack_required_field_text filter
to change the "required" text:
https://jetpack.com/2016/03/18/hook-of-the-month-customizing-contact-forms/

To change the submit button text, you can use a custom shortcode
parameter, submit_button_text, as explained here:
https://jetpack.com/support/contact-form/#customize-submit


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#3734 (comment)

Salomé

@salomestarbuck
Copy link

So, would I place that code into the functions.php file of my theme?

On Mon, May 2, 2016 at 7:06 AM, Salome Starbuck salomestarbuck@gmail.com
wrote:

Thank you!!!

On Mon, May 2, 2016 at 12:02 AM, Jeremy Herve notifications@github.com
wrote:

@salomestarbuck https://github.com/salomestarbuck We haven't made any
changes to that feature yet.

modifying the 'required' text and the text on the 'Submit' button on the
contact form. Whatever is going on with the regex is causing the rest of
the code to be unrecognized as JS in the editor

It's worth noting that you can use the jetpack_required_field_text
filter to change the "required" text:

https://jetpack.com/2016/03/18/hook-of-the-month-customizing-contact-forms/

To change the submit button text, you can use a custom shortcode
parameter, submit_button_text, as explained here:
https://jetpack.com/support/contact-form/#customize-submit


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#3734 (comment)

Salomé

Salomé

@jeherve
Copy link
Member

jeherve commented May 3, 2016

@salomestarbuck The jetpack_required_field_text filter function has to be placed in your theme's functions.php file, or in a functionality plugin.

The submit_button_text shortcode parameter has to be included in the contact form shortcode that appears in your page editor.

@samhotchkiss samhotchkiss modified the milestones: Community, Not Currently Planned Feb 10, 2017
@jeherve jeherve added the Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ label Oct 1, 2018
@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label Oct 9, 2019
@jeherve jeherve modified the milestones: Not Currently Planned, 7.9 Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Contact Form Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Type] Good First Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants