Multi-Field Registration Validator
Write a function validate_registration(name, age_input, email) that checks all of the following, collecting every problem found rather than stopping at the first:
age_inputmust convert to a whole number between 11 and 19 (inclusive).namemust not be blank (ignoring surrounding whitespace).emailmust contain an@symbol.
Return a list of error message strings, in this exact order when they apply: age error, then name error, then email error. Use exactly these messages: "Age must be a whole number.", "Age must be between 11 and 19.", "Name cannot be blank.", "Email must contain an @ symbol.".
Read name, age_input and email from input, one per line. If there are errors, print each on its own line; otherwise print Valid.
main.py
Loading editor…
Console
Run your code to see output here.