Answer the question
In order to leave comments, you need to log in
How to implement validation of adding items to the cart?
Now, if the product is not available, you can add it directly by replacing the data in the request parameters (this is a bug) - it has been eliminated and now you need to add validation.
This is a test task for the Junior Manual QA position.
And I can't figure out which way to approach it.
Answer the question
In order to leave comments, you need to log in
Actually, this resource is not for assignments, the question should have been formulated more clearly.
Validation is the verification of parameters to satisfy conditions and constraints. Obviously, you need to formulate conditions, define restrictions, perform parameter checks, and in case of a mismatch, generate an appropriate error instead of further processing the request.
What exactly is causing you difficulty? If it is not clear from which side to sit at the computer - this is one thing, approach from the side of the keyboard. If it is not clear how to do it in code, then you have provided little information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question