Validate request body before sending POST request
Preconditions (3)
Step 1: Open Postman and create a new POST request to https://api.example.com/users
Step 2: In the Body tab, select raw and JSON format
Step 3: Enter the JSON body with fields: name (string), email (string), age (number)
Step 4: Before sending, validate that name and email are not empty and age is a positive number
Step 5: If validation passes, send the request
Step 6: If validation fails, do not send and show an error message
✅ Expected Result: Request is sent only if the body fields meet validation rules; otherwise, an error message is shown and request is not sent