rchtgpt / summit

Read less. Learn more.
https://summit-mlh.tech/
GNU General Public License v3.0
0 stars 0 forks source link

Add an Input URL Validator #24

Closed rchtgpt closed 3 years ago

rchtgpt commented 3 years ago

Describe the bug If the user enters a link of the wrong format, our website tries to process it but doesn't give an error message when it fails.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://summit-mlh.vercel.app/
  2. Enter a link which is not of the format https://medium.com/@<username>/<post-id>
  3. Click Submit
  4. Nothing will change

Expected behavior An appropriate error message should be displayed telling the user that the link entered is incorrect.

Desktop (please complete the following information):

routrohan commented 3 years ago

@dotrachit I'll take it up Just help me a little here, which file should I put the regex in?

rchtgpt commented 3 years ago

@dotrachit I'll take it up Just help me a little here, which file should I put the regex in?

You can add the validator in https://github.com/dotrachit/summit/blob/main/src/components/summarizer.js