You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
SHUBHAMRAJPUT9665
changed the title
Currently, our application lacks input validation for creating new trains. This leaves us vulnerable to potential issues such as invalid or malicious data being entered into our database. To improve the robustness and security of our application, I propose implementing input validation middleware for train creation routes. Proposed Changes: Introduce input validation middleware using the express-validator library to validate the train_name, source, destination, and total_seats fields. Ensure that total_seats is a positive integer and that source and destination are different. Return appropriate error responses with descriptive error messages when validation fails. Integrate the validation middleware into the addTrain route handler to validate incoming requests before processing them.
Currently, lacks input validation for creating new trains.
May 11, 2024
The text was updated successfully, but these errors were encountered: