website icon indicating copy to clipboard operation
website copied to clipboard

[BUG]: No form validation in Subscribe to our newsletter to receive news about AsyncAPI in home Page

Open love-sonkar opened this issue 1 year ago • 20 comments

Describe the bug

In Home page we have a Subscribe to our newsletter to receive news about AsyncAPI form and there is no validation for email and name.

How to Reproduce

Go to home page scroll down to subscribe to newsletter form and randomly enter any email or name then click on subscribe button.

  • Screenshots ss

https://github.com/asyncapi/website/assets/82786865/80a57241-5b17-499e-9280-c24bc576dfdf

Expected behavior

Form must be completely valid like email must be a valid email address. and name must contain 3 or 4 character minimum.

love-sonkar avatar Sep 06 '23 16:09 love-sonkar

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

github-actions[bot] avatar Sep 06 '23 16:09 github-actions[bot]

Can anyone please assign this to me ? We can use RegExp to validate the email and name

Vikram125609 avatar Sep 07 '23 07:09 Vikram125609

i think regExp won't work , it can't validate whether domain exits or not . Email validation api's like reacher , truemail would work

Om2123 avatar Sep 10 '23 14:09 Om2123

yeah regex won't work. but is it a real issue? we are not getting any spam subscriptions. People usually don't do it to open source communities.

also can't be nicely completed until we get https://github.com/asyncapi/website/issues/1091

derberg avatar Sep 13 '23 15:09 derberg

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 12 '24 00:01 github-actions[bot]

@derberg @akshatnema should we go ahead with this issue ??

sambhavgupta0705 avatar Feb 23 '24 05:02 sambhavgupta0705

Yeah, we can go ahead with this issue.

akshatnema avatar Feb 24 '24 10:02 akshatnema

@akshatnema, can I take it and work on it? All I need is to research around the Email validation API to verify the name and email of whoever is entering it.

AKACHI-4 avatar Mar 01 '24 02:03 AKACHI-4

yeahhh you may work on this one

sambhavgupta0705 avatar Mar 01 '24 05:03 sambhavgupta0705

@AKACHI-4 any update

sambhavgupta0705 avatar Mar 05 '24 09:03 sambhavgupta0705

Yeah, I looked into various validation APIs, and man, it was kinda time taking. Some of them have pricing issues... However, I tried using Postman to call their API, and everything went smoothly... After all, I decided to go with ZeroBounce because they provide free 100 email validations per month, which is definitely a good choice.

What I'm planning to do now is

  • Implement email validation directly into the NewsletterSubscribe.js file before fetching from the Netlify function.
  • Regarding the mentioned issue, I encountered the same thing initially while checking. I guess it's from the function's side.
  • For now, I commented out that part so I can focus on implementing validation only. But I'll definitely look into it.

Here's the image I was using :- I tried usebouncer for checking, but I'm getting some CORS errors though. I'll resolve them and try to push the changes as soon as possible.

image

AKACHI-4 avatar Mar 05 '24 11:03 AKACHI-4

Ohkkk great!!

sambhavgupta0705 avatar Mar 07 '24 13:03 sambhavgupta0705

Raise a PR when you are done with the work

sambhavgupta0705 avatar Mar 07 '24 13:03 sambhavgupta0705

Hey @sambhavgupta0705 .. I am done with the changes. kindly review it and guide for further in steps.

AKACHI-4 avatar Mar 08 '24 06:03 AKACHI-4