Freecodecamp: Project Submission Throws Uncaught Error

Created on 29 Sep 2020  路  7Comments  路  Source: freeCodeCamp/freeCodeCamp

Submitting an invalid URL for the Front End projects does not behave as expected:
image

https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-tribute-page

Expected:

  • No uncaught errors
  • Camper is notified about misshapen URL
help wanted client bug

Most helpful comment

We should probably do a validation message that shows a warning when users submit URLs which are of the commonly mistaken types for example: the editor links, run links etc,

All 7 comments

Maybe can use a pattern to enforce a correct URL. Please see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url

In FormFields component if you add a pattern on the FormControl component it seems to solve the described problem but I think the pattern should be passed as part of the options prop and be applied conditionally.

I could take a look on that. Is there any other similar place on the ui where errors are caught and printed to the user?

Edit: As far as i can see the same bug applies for all lessons under: https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/

@kostaslamo If you take a look at what happens with the a clearly incorrect URL
image

This is moreso an issue with just a slightly incorrect URL which still manages to match the validation, but should not.

@kostaslamo If you take a look at what happens with the a clearly incorrect URL
image

This is moreso an issue with just a slightly incorrect URL which still manages to match the validation, but should not.

Ok, so the fix in the bug should be this kind of validation under the lessons located here: https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/

This bug has to do with the SolutionForm component, and the input validation for all projects. I have changed the title to reflect such.

This bug has to do with the SolutionForm component, and the input validation for all projects. I have changed the title to reflect such.

I will have a check for that and PR when ready.

We should probably do a validation message that shows a warning when users submit URLs which are of the commonly mistaken types for example: the editor links, run links etc,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jurijuri picture jurijuri  路  3Comments

ar5had picture ar5had  路  3Comments

raisedadead picture raisedadead  路  3Comments

robwelan picture robwelan  路  3Comments

Tzahile picture Tzahile  路  3Comments