Valid record
Input
{'username':'dev_user','age':30,'email':'dev@example.com','password':'Strong1Pass','tags':['python','dev']}
Output
[]
All fields meet the validation rules, so an empty list is returned.
Full lesson preview
Validate a user-like record against several rules and return all failing messages. Learn to collect and report multiple validation errors deterministically.
Problem statement
Task
Examples
Input
{'username':'dev_user','age':30,'email':'dev@example.com','password':'Strong1Pass','tags':['python','dev']}
Output
[]
All fields meet the validation rules, so an empty list is returned.
Input format
Output format
Constraints
Samples
Input
{'username':'ab','age':25,'email':'no-at-symbol','password':'weak','tags':['a','']}
Output
['username: must be 3-20 characters', 'email: must contain single @', 'password: must be at least 8 characters', 'password: must include a digit', 'password: must include uppercase letter', 'tags: tags must be non-empty strings']
Multiple rules fail; all failures are returned in a predictable order.