Open-Source-Chandigarh / Attendance-Manager

2 stars 10 forks source link

added validations to AddSubject component #3

Closed abhijithhegde closed 8 months ago

abhijithhegde commented 8 months ago

2

1.marked all the fields as required to prevent empty form submission 2.modified the input field to text and added input handler to only allow positive numbers

abhijithhegde commented 8 months ago

@hollermay it's fixed!

SuyashRajput commented 8 months ago

@hollermay I can still add empty subjects image

abhijithhegde commented 8 months ago

How, the form wont submit without filling all the 3 fields?

hollermay commented 8 months ago

@hollermay I can still add empty subjects image

Do it then

abhijithhegde commented 8 months ago

@hollermay can you check once? image

hollermay commented 8 months ago

How, the form wont submit without filling all the 3 fields? I'm checking it

hollermay commented 8 months ago

@hollermay can you check once? image

It's in the function managedata in AddSubject.js file

abhijithhegde commented 8 months ago

It's in the function managedata in AddSubject.js file You're able to submit without filling the form? No because it's in the function that prevents you to submit an empty field

abhijithhegde commented 8 months ago

@hollermay so it's already fixed right?

hollermay commented 8 months ago

@abhijithhegde yes it's already been taken care of :)