GDG-On-Campus-ICTU / MaterialHub-Hactoberfest

This repository contains the source code for a single-page web application that displays a list of cool tech materials. Users can view detailed information about each material, including the contributor, resource name, link, and tags. New materials can be added through a user-friendly form.
https://material-hub-hactoberfest.vercel.app/
7 stars 11 forks source link

Add client-side data validation #20

Open Perry-Bright opened 6 days ago

Perry-Bright commented 6 days ago

Data validation on the client-side to prevent inconsistent or invalid data being stored

Perry-Bright commented 6 days ago

It could also handle duplicate entries

mohtasheem135 commented 5 days ago

Handling duplicate data is very much possible and we can achieve it but how to make sure that the added data is valid or not.

Perry-Bright commented 5 days ago

we can use the fetch API to make a HEAD request to the link. If the response is OK (200-299), we consider the link valid. If the response is not OK, or if there's an error making the request, we consider the link invalid.

but this implementation has some limitations:

after more research, we can solve this issues using more complex crawling algorithms that use a combination of techniques like

mohtasheem135 commented 5 days ago

Cool, I think it can be done.

Perry-Bright commented 5 days ago

I appreciate your positive attitude and approach to challenging tasks. It's great working with you, @mohtasheem135