SauveJeanLuc / coffee-tasks

Next gen AI Powered Todo-List
https://coffeetasks.netlify.app
MIT License
38 stars 73 forks source link

Bug Fixed: Added task name validation #150

Closed divya-nshi closed 1 year ago

divya-nshi commented 1 year ago

Issue Fixed: #149 Added a validation to the task name before adding the task to prevent tasks with empty string being added

Description

Added a validation check before adding the task to the list of tasks

 if(currentTask.trim().length == 0) setError('Please enter a non empty title!')

This change introduced as to validate the title after trimming to additional spaces and then checking if the name is a valid string thus preventing any unwanted spaces to be accepted as a valid string name

Checklist:

Screenshots:

Animation1

netlify[bot] commented 1 year ago

Deploy Preview for coffeetasks ready!

Name Link
Latest commit 647c2d1f15668aa5848dc7fc5e699bf37295c23c
Latest deploy log https://app.netlify.com/sites/coffeetasks/deploys/63503a8e8a5e4700080a36c1
Deploy Preview https://deploy-preview-150--coffeetasks.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

SauveJeanLuc commented 1 year ago

@divya-nshi join #62

divya-nshi commented 1 year ago

@SauveJeanLuc yep done:)