Submitting an invalid URL for the Front End projects does not behave as expected:
Expected:
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
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
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,
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,