Scenario
You’re testing a registration form athttps://testpages.eviltester.com/styled/validation/input-validation.html that has multiple input types:
- Text fields with length restrictions
- Email fields with format validation
- Numeric fields with range limits
- Required checkboxes
Workflow
Start session and discover form structure
Navigate to the form and use the form discovery command to see all fields.Expected output:The form discovery shows field indices, types, validation state, and ready-to-use commands.
Test required field validation
Attempt to submit the form without filling required fields.Expected output:
Test each field with invalid inputs
Systematically test boundary conditions and invalid formats.After each invalid input, check for error messages:
Test field length restrictions
Test minimum and maximum length constraints.Expected output:The browser enforced the maxlength attribute by truncating at 50 characters.
Test with valid inputs
Fill all fields with valid data and verify the form accepts submission.Expected output:
Monitor network requests during submission
Watch for AJAX validation or form submission requests.Expected output:
Validation Test Matrix
Use this systematic approach to test all validation rules:| Field Type | Valid Input | Invalid Input | Boundary Case |
|---|---|---|---|
[email protected] | not-an-email | [email protected] | |
| Number | 25 | abc | 0, 999, -1 |
| Text (required) | John Doe | “ (empty) | Single char: A |
| Password | SecurePass123! | 123 | Min length boundary |
| Checkbox | checked | unchecked | Toggle multiple times |
Common Validation Bugs
Client-side validation bypassed
Client-side validation bypassed
Symptom: Form submits even with invalid data.Test:If the POST request succeeds with invalid data, server-side validation is missing.
Validation messages not accessible
Validation messages not accessible
Symptom: Error messages visible but not announced to screen readers.Test:
Inconsistent validation triggers
Inconsistent validation triggers
Symptom: Validation only runs on submit, not on blur.Test:Best practice: Validate on blur for immediate feedback.
XSS vulnerabilities in error messages
XSS vulnerabilities in error messages
Symptom: User input reflected in error messages without sanitization.Test:
Automation Script Example
Create a shell script to test all validation cases:Tips
Use form discovery to get field indices
Check validation state programmatically
Export failed validation attempts
Next Steps
Form Discovery
Learn about the
bdg dom form commandDOM Interaction
Master fill, click, and submit commands
Accessibility Testing
Check form accessibility with a11y commands
Debugging SPAs
Debug dynamic form validation in SPAs

